|
| 1 | +<?xml version="1.0"?> |
| 2 | +<!-- |
| 3 | +/** |
| 4 | + * Copyright © OpenGento, All rights reserved. |
| 5 | + * See LICENSE bundled with this library for license details. |
| 6 | + */ |
| 7 | +--> |
| 8 | +<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd"> |
| 9 | + <table name="opengento_document_type" resource="default" engine="innodb" comment="opengento_document_type"> |
| 10 | + <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true" comment="Document Type Entity ID"/> |
| 11 | + <column xsi:type="varchar" name="code" nullable="false" length="255" comment="Document Type Identifier"/> |
| 12 | + <column xsi:type="boolean" name="scheduled_import" nullable="false" comment="Document Type Schedule Import"/> |
| 13 | + <column xsi:type="text" name="name" nullable="false" comment="Document Type Title"/> |
| 14 | + <column xsi:type="text" name="file_source_path" nullable="false" comment="Files Source Path of the Document Type"/> |
| 15 | + <column xsi:type="text" name="file_dest_path" nullable="false" comment="Files Destination Path of the Document Type"/> |
| 16 | + <column xsi:type="int" name="sub_path_length" padding="11" unsigned="false" nullable="false" identity="false" comment="Destination Sub Path Length of the Document Type"/> |
| 17 | + <column xsi:type="text" name="file_pattern" nullable="false" comment="Document File Pattern"/> |
| 18 | + <column xsi:type="text" name="file_allowed_extensions" nullable="false" comment="Document Allowed Extensions"/> |
| 19 | + <column xsi:type="text" name="default_image_file_name" nullable="false" comment="Document Default Image File Name"/> |
| 20 | + <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP" comment="Created_at"/> |
| 21 | + <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="true" default="CURRENT_TIMESTAMP" comment="Updated_at"/> |
| 22 | + <constraint xsi:type="primary" referenceId="PRIMARY"> |
| 23 | + <column name="entity_id"/> |
| 24 | + </constraint> |
| 25 | + <constraint xsi:type="unique" referenceId="OPENGENTO_DOCUMENT_TYPE_CODE"> |
| 26 | + <column name="code"/> |
| 27 | + </constraint> |
| 28 | + <index referenceId="OPENGENTO_DOCUMENT_TYPE_SCHEDULED_IMPORT" indexType="btree"> |
| 29 | + <column name="scheduled_import"/> |
| 30 | + </index> |
| 31 | + </table> |
| 32 | + <table name="opengento_document" resource="default" engine="innodb" comment="opengento_document"> |
| 33 | + <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true" comment="Document Entity ID"/> |
| 34 | + <column xsi:type="int" name="type_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Document related Type ID"/> |
| 35 | + <column xsi:type="varchar" name="code" nullable="false" length="255" comment="Document Identifier"/> |
| 36 | + <column xsi:type="text" name="name" nullable="false" comment="Document Name"/> |
| 37 | + <column xsi:type="text" name="description" nullable="false" comment="Document Description"/> |
| 38 | + <column xsi:type="varchar" name="file_locale" nullable="true" length="8" comment="Document Locale"/> |
| 39 | + <column xsi:type="text" name="file_name" nullable="false" comment="Document File Name"/> |
| 40 | + <column xsi:type="text" name="file_path" nullable="false" comment="Document File Relative Path"/> |
| 41 | + <column xsi:type="text" name="image_file_name" nullable="true" comment="Document Image File Name"/> |
| 42 | + <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP" comment="Created_at"/> |
| 43 | + <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="true" default="CURRENT_TIMESTAMP" comment="Updated_at"/> |
| 44 | + <constraint xsi:type="primary" referenceId="PRIMARY"> |
| 45 | + <column name="entity_id"/> |
| 46 | + </constraint> |
| 47 | + <constraint xsi:type="foreign" referenceId="OPENGENTO_DOCUMENT_TYPE_ID_OPENGENTO_DOCUMENT_TYPE_ENTITY_ID" table="opengento_document" column="type_id" referenceTable="opengento_document_type" referenceColumn="entity_id" onDelete="CASCADE"/> |
| 48 | + <constraint xsi:type="unique" referenceId="OPENGENTO_DOCUMENT_CODE_TYPE_ID"> |
| 49 | + <column name="code"/> |
| 50 | + <column name="type_id"/> |
| 51 | + </constraint> |
| 52 | + <index referenceId="OPENGENTO_DOCUMENT_NAME" indexType="fulltext"> |
| 53 | + <column name="name"/> |
| 54 | + </index> |
| 55 | + </table> |
| 56 | +</schema> |
0 commit comments