123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?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="wishlist" resource="default" engine="innodb" comment="Wishlist main Table">
- <column xsi:type="int" name="wishlist_id" padding="10" unsigned="true" nullable="false" identity="true"
- comment="Wishlist ID"/>
- <column xsi:type="int" name="customer_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Customer ID"/>
- <column xsi:type="smallint" name="shared" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Sharing flag (0 or 1)"/>
- <column xsi:type="varchar" name="sharing_code" nullable="true" length="32" comment="Sharing encrypted code"/>
- <column xsi:type="timestamp" name="updated_at" on_update="false" nullable="true" comment="Last updated date"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="wishlist_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="WISHLIST_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID" table="wishlist"
- column="customer_id" referenceTable="customer_entity" referenceColumn="entity_id"
- onDelete="CASCADE"/>
- <constraint xsi:type="unique" referenceId="WISHLIST_CUSTOMER_ID">
- <column name="customer_id"/>
- </constraint>
- <index referenceId="WISHLIST_SHARED" indexType="btree">
- <column name="shared"/>
- </index>
- </table>
- <table name="wishlist_item" resource="default" engine="innodb" comment="Wishlist items">
- <column xsi:type="int" name="wishlist_item_id" padding="10" unsigned="true" nullable="false" identity="true"
- comment="Wishlist item ID"/>
- <column xsi:type="int" name="wishlist_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Wishlist ID"/>
- <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Product ID"/>
- <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
- comment="Store ID"/>
- <column xsi:type="timestamp" name="added_at" on_update="false" nullable="true" comment="Add date and time"/>
- <column xsi:type="text" name="description" nullable="true" comment="Short description of wish list item"/>
- <column xsi:type="decimal" name="qty" scale="4" precision="12" unsigned="false" nullable="false"
- comment="Qty"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="wishlist_item_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="WISHLIST_ITEM_WISHLIST_ID_WISHLIST_WISHLIST_ID" table="wishlist_item"
- column="wishlist_id" referenceTable="wishlist" referenceColumn="wishlist_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="WISHLIST_ITEM_PRODUCT_ID_CATALOG_PRODUCT_ENTITY_ENTITY_ID"
- table="wishlist_item" column="product_id" referenceTable="catalog_product_entity"
- referenceColumn="entity_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="WISHLIST_ITEM_STORE_ID_STORE_STORE_ID" table="wishlist_item"
- column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="SET NULL"/>
- <index referenceId="WISHLIST_ITEM_WISHLIST_ID" indexType="btree">
- <column name="wishlist_id"/>
- </index>
- <index referenceId="WISHLIST_ITEM_PRODUCT_ID" indexType="btree">
- <column name="product_id"/>
- </index>
- <index referenceId="WISHLIST_ITEM_STORE_ID" indexType="btree">
- <column name="store_id"/>
- </index>
- </table>
- <table name="wishlist_item_option" resource="default" engine="innodb" comment="Wishlist Item Option Table">
- <column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="true"
- comment="Option Id"/>
- <column xsi:type="int" name="wishlist_item_id" padding="10" unsigned="true" nullable="false" identity="false"
- comment="Wishlist Item Id"/>
- <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
- comment="Product Id"/>
- <column xsi:type="varchar" name="code" nullable="false" length="255" comment="Code"/>
- <column xsi:type="text" name="value" nullable="true" comment="Value"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="option_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="FK_A014B30B04B72DD0EAB3EECD779728D6" table="wishlist_item_option"
- column="wishlist_item_id" referenceTable="wishlist_item" referenceColumn="wishlist_item_id"
- onDelete="CASCADE"/>
- </table>
- </schema>
|