123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- <?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="product_alert_price" resource="default" engine="innodb" comment="Product Alert Price">
- <column xsi:type="int" name="alert_price_id" padding="10" unsigned="true" nullable="false" identity="true"
- comment="Product alert price id"/>
- <column xsi:type="int" name="customer_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Customer id"/>
- <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Product id"/>
- <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="false" default="0"
- comment="Price amount"/>
- <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Website id"/>
- <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
- default="0" comment="Store id"/>
- <column xsi:type="timestamp" name="add_date" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
- comment="Product alert add date"/>
- <column xsi:type="timestamp" name="last_send_date" on_update="false" nullable="true"
- comment="Product alert last send date"/>
- <column xsi:type="smallint" name="send_count" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Product alert send count"/>
- <column xsi:type="smallint" name="status" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Product alert status"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="alert_price_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="PRODUCT_ALERT_PRICE_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID"
- table="product_alert_price" column="customer_id" referenceTable="customer_entity"
- referenceColumn="entity_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="PRODUCT_ALERT_PRICE_PRODUCT_ID_CATALOG_PRODUCT_ENTITY_ENTITY_ID"
- table="product_alert_price" column="product_id" referenceTable="catalog_product_entity"
- referenceColumn="entity_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="PRODUCT_ALERT_PRICE_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID"
- table="product_alert_price" column="website_id" referenceTable="store_website"
- referenceColumn="website_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="PRODUCT_ALERT_PRICE_STORE_ID_STORE_STORE_ID"
- table="product_alert_stock" column="store_id" referenceTable="store"
- referenceColumn="store_id" onDelete="CASCADE"/>
- <index referenceId="PRODUCT_ALERT_PRICE_CUSTOMER_ID" indexType="btree">
- <column name="customer_id"/>
- </index>
- <index referenceId="PRODUCT_ALERT_PRICE_PRODUCT_ID" indexType="btree">
- <column name="product_id"/>
- </index>
- <index referenceId="PRODUCT_ALERT_PRICE_WEBSITE_ID" indexType="btree">
- <column name="website_id"/>
- </index>
- <index referenceId="PRODUCT_ALERT_PRICE_STORE_ID" indexType="btree">
- <column name="store_id"/>
- </index>
- </table>
- <table name="product_alert_stock" resource="default" engine="innodb" comment="Product Alert Stock">
- <column xsi:type="int" name="alert_stock_id" padding="10" unsigned="true" nullable="false" identity="true"
- comment="Product alert stock id"/>
- <column xsi:type="int" name="customer_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Customer 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="website_id" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Website id"/>
- <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
- default="0" comment="Store id"/>
- <column xsi:type="timestamp" name="add_date" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
- comment="Product alert add date"/>
- <column xsi:type="timestamp" name="send_date" on_update="false" nullable="true"
- comment="Product alert send date"/>
- <column xsi:type="smallint" name="send_count" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Send Count"/>
- <column xsi:type="smallint" name="status" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Product alert status"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="alert_stock_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="PRODUCT_ALERT_STOCK_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID"
- table="product_alert_stock" column="website_id" referenceTable="store_website"
- referenceColumn="website_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="PRODUCT_ALERT_STOCK_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID"
- table="product_alert_stock" column="customer_id" referenceTable="customer_entity"
- referenceColumn="entity_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="PRODUCT_ALERT_STOCK_PRODUCT_ID_CATALOG_PRODUCT_ENTITY_ENTITY_ID"
- table="product_alert_stock" column="product_id" referenceTable="catalog_product_entity"
- referenceColumn="entity_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="PRODUCT_ALERT_STOCK_STORE_ID_STORE_STORE_ID"
- table="product_alert_stock" column="store_id" referenceTable="store"
- referenceColumn="store_id" onDelete="CASCADE"/>
- <index referenceId="PRODUCT_ALERT_STOCK_CUSTOMER_ID" indexType="btree">
- <column name="customer_id"/>
- </index>
- <index referenceId="PRODUCT_ALERT_STOCK_PRODUCT_ID" indexType="btree">
- <column name="product_id"/>
- </index>
- <index referenceId="PRODUCT_ALERT_STOCK_WEBSITE_ID" indexType="btree">
- <column name="website_id"/>
- </index>
- <index referenceId="PRODUCT_ALERT_STOCK_STORE_ID" indexType="btree">
- <column name="store_id"/>
- </index>
- </table>
- </schema>
|