123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- <?xml version="1.0"?>
- <!--
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- -->
- <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
- <table name="widget" resource="default" engine="innodb" comment="Preconfigured Widgets">
- <column xsi:type="int" name="widget_id" padding="10" unsigned="true" nullable="false" identity="true"
- comment="Widget Id"/>
- <column xsi:type="varchar" name="widget_code" nullable="true" length="255"
- comment="Widget code for template directive"/>
- <column xsi:type="varchar" name="widget_type" nullable="true" length="255" comment="Widget Type"/>
- <column xsi:type="text" name="parameters" nullable="true" comment="Parameters"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="widget_id"/>
- </constraint>
- <index referenceId="WIDGET_WIDGET_CODE" indexType="btree">
- <column name="widget_code"/>
- </index>
- </table>
- <table name="widget_instance" resource="default" engine="innodb" comment="Instances of Widget for Package Theme">
- <column xsi:type="int" name="instance_id" padding="10" unsigned="true" nullable="false" identity="true"
- comment="Instance Id"/>
- <column xsi:type="varchar" name="instance_type" nullable="true" length="255" comment="Instance Type"/>
- <column xsi:type="int" name="theme_id" padding="10" unsigned="true" nullable="false" identity="false"
- comment="Theme id"/>
- <column xsi:type="varchar" name="title" nullable="true" length="255" comment="Widget Title"/>
- <column xsi:type="varchar" name="store_ids" nullable="false" length="255" default="0" comment="Store ids"/>
- <column xsi:type="text" name="widget_parameters" nullable="true" comment="Widget parameters"/>
- <column xsi:type="smallint" name="sort_order" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Sort order"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="instance_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="WIDGET_INSTANCE_THEME_ID_THEME_THEME_ID" table="widget_instance"
- column="theme_id" referenceTable="theme" referenceColumn="theme_id" onDelete="CASCADE"/>
- </table>
- <table name="widget_instance_page" resource="default" engine="innodb" comment="Instance of Widget on Page">
- <column xsi:type="int" name="page_id" padding="10" unsigned="true" nullable="false" identity="true"
- comment="Page Id"/>
- <column xsi:type="int" name="instance_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Instance Id"/>
- <column xsi:type="varchar" name="page_group" nullable="true" length="25" comment="Block Group Type"/>
- <column xsi:type="varchar" name="layout_handle" nullable="true" length="255" comment="Layout Handle"/>
- <column xsi:type="varchar" name="block_reference" nullable="true" length="255" comment="Container"/>
- <column xsi:type="varchar" name="page_for" nullable="true" length="25" comment="For instance entities"/>
- <column xsi:type="text" name="entities" nullable="true" comment="Catalog entities (comma separated)"/>
- <column xsi:type="varchar" name="page_template" nullable="true" length="255" comment="Path to widget template"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="page_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="WIDGET_INSTANCE_PAGE_INSTANCE_ID_WIDGET_INSTANCE_INSTANCE_ID"
- table="widget_instance_page" column="instance_id" referenceTable="widget_instance"
- referenceColumn="instance_id" onDelete="CASCADE"/>
- <index referenceId="WIDGET_INSTANCE_PAGE_INSTANCE_ID" indexType="btree">
- <column name="instance_id"/>
- </index>
- </table>
- <table name="widget_instance_page_layout" resource="default" engine="innodb" comment="Layout updates">
- <column xsi:type="int" name="page_id" padding="10" unsigned="true" nullable="false" identity="false" default="0"
- comment="Page Id"/>
- <column xsi:type="int" name="layout_update_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Layout Update Id"/>
- <constraint xsi:type="foreign" referenceId="WIDGET_INSTANCE_PAGE_LAYOUT_PAGE_ID_WIDGET_INSTANCE_PAGE_PAGE_ID"
- table="widget_instance_page_layout" column="page_id" referenceTable="widget_instance_page"
- referenceColumn="page_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="WIDGET_INSTANCE_PAGE_LYT_LYT_UPDATE_ID_LYT_UPDATE_LYT_UPDATE_ID"
- table="widget_instance_page_layout" column="layout_update_id" referenceTable="layout_update"
- referenceColumn="layout_update_id" onDelete="CASCADE"/>
- <constraint xsi:type="unique" referenceId="WIDGET_INSTANCE_PAGE_LAYOUT_LAYOUT_UPDATE_ID_PAGE_ID">
- <column name="layout_update_id"/>
- <column name="page_id"/>
- </constraint>
- <index referenceId="WIDGET_INSTANCE_PAGE_LAYOUT_PAGE_ID" indexType="btree">
- <column name="page_id"/>
- </index>
- </table>
- <table name="layout_update" resource="default" engine="innodb" comment="Layout Updates">
- <column xsi:type="int" name="layout_update_id" padding="10" unsigned="true" nullable="false" identity="true"
- comment="Layout Update Id"/>
- <column xsi:type="varchar" name="handle" nullable="true" length="255" comment="Handle"/>
- <column xsi:type="text" name="xml" nullable="true" comment="Xml"/>
- <column xsi:type="smallint" name="sort_order" padding="6" unsigned="false" nullable="false" identity="false"
- default="0" comment="Sort Order"/>
- <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="true" default="0"
- comment="Last Update Timestamp"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="layout_update_id"/>
- </constraint>
- <index referenceId="LAYOUT_UPDATE_HANDLE" indexType="btree">
- <column name="handle"/>
- </index>
- </table>
- <table name="layout_link" resource="default" engine="innodb" comment="Layout Link">
- <column xsi:type="int" name="layout_link_id" padding="10" unsigned="true" nullable="false" identity="true"
- comment="Link Id"/>
- <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Store Id"/>
- <column xsi:type="int" name="theme_id" padding="10" unsigned="true" nullable="false" identity="false"
- comment="Theme id"/>
- <column xsi:type="int" name="layout_update_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Layout Update Id"/>
- <column xsi:type="boolean" name="is_temporary" nullable="false" default="false"
- comment="Defines whether Layout Update is Temporary"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="layout_link_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="LAYOUT_LINK_LAYOUT_UPDATE_ID_LAYOUT_UPDATE_LAYOUT_UPDATE_ID"
- table="layout_link" column="layout_update_id" referenceTable="layout_update"
- referenceColumn="layout_update_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="LAYOUT_LINK_STORE_ID_STORE_STORE_ID" table="layout_link" column="store_id"
- referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="LAYOUT_LINK_THEME_ID_THEME_THEME_ID" table="layout_link" column="theme_id"
- referenceTable="theme" referenceColumn="theme_id" onDelete="CASCADE"/>
- <index referenceId="LAYOUT_LINK_LAYOUT_UPDATE_ID" indexType="btree">
- <column name="layout_update_id"/>
- </index>
- <index referenceId="LAYOUT_LINK_STORE_ID_THEME_ID_LAYOUT_UPDATE_ID_IS_TEMPORARY" indexType="btree">
- <column name="store_id"/>
- <column name="theme_id"/>
- <column name="layout_update_id"/>
- <column name="is_temporary"/>
- </index>
- </table>
- </schema>
|