associated content for categories and products tables
This commit is contained in:
@@ -425,32 +425,6 @@
|
||||
<parameter name="log_created_by" value="true" />
|
||||
</behavior>
|
||||
</table>
|
||||
<table name="content_assoc" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="category_id" type="INTEGER" />
|
||||
<column name="product_id" type="INTEGER" />
|
||||
<column name="content_id" type="INTEGER" />
|
||||
<column name="position" type="INTEGER" />
|
||||
<foreign-key foreignTable="category" name="fk_content_assoc_category_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="category_id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="product" name="fk_content_assoc_product_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="product_id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="content" name="fk_content_assoc_content_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="content_id" />
|
||||
</foreign-key>
|
||||
<index name="idx_content_assoc_category_id">
|
||||
<index-column name="category_id" />
|
||||
</index>
|
||||
<index name="idx_content_assoc_product_id">
|
||||
<index-column name="product_id" />
|
||||
</index>
|
||||
<index name="idx_content_assoc_content_id">
|
||||
<index-column name="content_id" />
|
||||
</index>
|
||||
<behavior name="timestampable" />
|
||||
</table>
|
||||
<table name="product_image" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="product_id" required="true" type="INTEGER" />
|
||||
@@ -817,30 +791,21 @@
|
||||
<table name="coupon" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="code" required="true" size="45" type="VARCHAR" />
|
||||
<column name="action" required="true" size="255" type="VARCHAR" />
|
||||
<column name="type" required="true" size="255" type="VARCHAR" />
|
||||
<column name="title" required="true" size="255" type="VARCHAR" />
|
||||
<column name="short_description" required="true" type="LONGVARCHAR" />
|
||||
<column name="description" required="true" type="CLOB" />
|
||||
<column name="value" required="true" type="FLOAT" />
|
||||
<column name="used" type="TINYINT" />
|
||||
<column name="available_since" type="TIMESTAMP" />
|
||||
<column name="date_limit" type="TIMESTAMP" />
|
||||
<column name="activate" type="TINYINT" />
|
||||
<column name="is_used" required="true" type="TINYINT" />
|
||||
<column name="is_enabled" required="true" type="TINYINT" />
|
||||
<column name="expiration_date" required="true" type="TIMESTAMP" />
|
||||
<column name="serialized_rules" required="true" type="LONGVARCHAR" />
|
||||
<unique name="code_UNIQUE">
|
||||
<unique-column name="code" />
|
||||
</unique>
|
||||
<behavior name="timestampable" />
|
||||
</table>
|
||||
<table name="coupon_rule" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="coupon_id" required="true" type="INTEGER" />
|
||||
<column name="controller" size="255" type="VARCHAR" />
|
||||
<column name="operation" size="255" type="VARCHAR" />
|
||||
<column name="value" type="FLOAT" />
|
||||
<foreign-key foreignTable="coupon" name="fk_coupon_rule_coupon_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="coupon_id" />
|
||||
</foreign-key>
|
||||
<index name="idx_coupon_rule_coupon_id">
|
||||
<index-column name="coupon_id" />
|
||||
</index>
|
||||
<behavior name="timestampable" />
|
||||
<behavior name="i18n" />
|
||||
<behavior name="versionable" />
|
||||
</table>
|
||||
<table name="coupon_order" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
@@ -850,9 +815,15 @@
|
||||
<foreign-key foreignTable="order" name="fk_coupon_order_order_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="order_id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="coupon" name="fk_coupon_order_coupon">
|
||||
<reference foreign="code" local="code" />
|
||||
</foreign-key>
|
||||
<index name="idx_coupon_order_order_id">
|
||||
<index-column name="order_id" />
|
||||
</index>
|
||||
<index name="fk_coupon_order_coupon_idx">
|
||||
<index-column name="code" />
|
||||
</index>
|
||||
<behavior name="timestampable" />
|
||||
</table>
|
||||
<table name="admin_log" namespace="Thelia\Model">
|
||||
@@ -1086,4 +1057,42 @@
|
||||
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
|
||||
</behavior>
|
||||
</table>
|
||||
<table name="product_associated_content" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="product_id" required="true" type="INTEGER" />
|
||||
<column name="content_id" required="true" type="INTEGER" />
|
||||
<column name="position" required="true" type="INTEGER" />
|
||||
<foreign-key foreignTable="product" name="fk_product_associated_content_product_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="product_id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="content" name="fk_product_associated_content_content_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="content_id" />
|
||||
</foreign-key>
|
||||
<index name="idx_product_associated_content_product_id">
|
||||
<index-column name="product_id" />
|
||||
</index>
|
||||
<index name="idx_product_associated_content_content_id">
|
||||
<index-column name="content_id" />
|
||||
</index>
|
||||
<behavior name="timestampable" />
|
||||
</table>
|
||||
<table name="category_associated_content" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="category_id" required="true" type="INTEGER" />
|
||||
<column name="content_id" required="true" type="INTEGER" />
|
||||
<column name="position" required="true" type="INTEGER" />
|
||||
<foreign-key foreignTable="category" name="fk_category_associated_content_category_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="category_id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="content" name="fk_category_associated_content_content_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="content_id" />
|
||||
</foreign-key>
|
||||
<index name="idx_category_associated_content_category_id">
|
||||
<index-column name="category_id" />
|
||||
</index>
|
||||
<index name="idx_category_associated_content_content_id">
|
||||
<index-column name="content_id" />
|
||||
</index>
|
||||
<behavior name="timestampable" />
|
||||
</table>
|
||||
</database>
|
||||
|
||||
Reference in New Issue
Block a user