Files
sterivein/local/config/schema.xml
2013-09-06 18:41:44 +02:00

1138 lines
55 KiB
XML
Executable File

<?xml version="1.0" encoding="UTF-8"?>
<database defaultIdMethod="native" name="thelia">
<table name="category" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="parent" type="INTEGER" />
<column name="visible" required="true" type="TINYINT" />
<column name="position" required="true" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
<behavior name="versionable">
<parameter name="log_created_at" value="true" />
<parameter name="log_created_by" value="true" />
</behavior>
<behavior name="timestampable" />
</table>
<table name="product" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="tax_rule_id" type="INTEGER" />
<column name="ref" required="true" size="255" type="VARCHAR" />
<column defaultValue="0" name="visible" required="true" type="TINYINT" />
<column name="position" required="true" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<foreign-key foreignTable="tax_rule" name="fk_product_tax_rule_id" onDelete="SET NULL" onUpdate="RESTRICT">
<reference foreign="id" local="tax_rule_id" />
</foreign-key>
<unique name="ref_UNIQUE">
<unique-column name="ref" />
</unique>
<index name="idx_product_tax_rule_id">
<index-column name="tax_rule_id" />
</index>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
<behavior name="versionable">
<parameter name="log_created_at" value="true" />
<parameter name="log_created_by" value="true" />
</behavior>
</table>
<table isCrossRef="true" name="product_category" namespace="Thelia\Model">
<column name="product_id" primaryKey="true" required="true" type="INTEGER" />
<column name="category_id" primaryKey="true" required="true" type="INTEGER" />
<foreign-key foreignTable="product" name="fk_product_has_category_product1" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="product_id" />
</foreign-key>
<foreign-key foreignTable="category" name="fk_product_has_category_category1" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="category_id" />
</foreign-key>
<index name="idx_product_has_category_category1">
<index-column name="category_id" />
</index>
<index name="idx_product_has_category_product1">
<index-column name="product_id" />
</index>
<behavior name="timestampable" />
</table>
<table name="country" namespace="Thelia\Model">
<column name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="area_id" type="INTEGER" />
<column name="isocode" required="true" size="4" type="VARCHAR" />
<column name="isoalpha2" size="2" type="VARCHAR" />
<column name="isoalpha3" size="4" type="VARCHAR" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<foreign-key foreignTable="area" name="fk_country_area_id" onDelete="SET NULL" onUpdate="RESTRICT">
<reference foreign="id" local="area_id" />
</foreign-key>
<index name="idx_country_area_id">
<index-column name="area_id" />
</index>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
</table>
<table name="tax" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="rate" required="true" type="FLOAT" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="LONGVARCHAR" />
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description" />
</behavior>
</table>
<table name="tax_rule" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="code" size="45" type="VARCHAR" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="LONGVARCHAR" />
<behavior name="timestampable" />
<behavior name="i18n" />
</table>
<table name="tax_rule_country" namespace="Thelia\Model">
<column name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="tax_rule_id" type="INTEGER" />
<column name="country_id" type="INTEGER" />
<column name="tax_id" type="INTEGER" />
<column name="none" type="TINYINT" />
<foreign-key foreignTable="tax" name="fk_tax_rule_country_tax_id" onDelete="SET NULL" onUpdate="RESTRICT">
<reference foreign="id" local="tax_id" />
</foreign-key>
<foreign-key foreignTable="tax_rule" name="fk_tax_rule_country_tax_rule_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="tax_rule_id" />
</foreign-key>
<foreign-key foreignTable="country" name="fk_tax_rule_country_country_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="country_id" />
</foreign-key>
<index name="idx_tax_rule_country_tax_id">
<index-column name="tax_id" />
</index>
<index name="idx_tax_rule_country_tax_rule_id">
<index-column name="tax_rule_id" />
</index>
<index name="idx_tax_rule_country_country_id">
<index-column name="country_id" />
</index>
<behavior name="timestampable" />
</table>
<table name="feature" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column defaultValue="0" name="visible" type="INTEGER" />
<column name="position" required="true" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
</table>
<table name="feature_av" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="feature_id" required="true" type="INTEGER" />
<column name="position" required="true" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<foreign-key foreignTable="feature" name="fk_feature_av_feature_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="feature_id" />
</foreign-key>
<index name="idx_feature_av_feature_id">
<index-column name="feature_id" />
</index>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
</table>
<table name="feature_product" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="product_id" required="true" type="INTEGER" />
<column name="feature_id" required="true" type="INTEGER" />
<column name="feature_av_id" type="INTEGER" />
<column name="by_default" size="255" type="VARCHAR" />
<column name="position" type="INTEGER" />
<foreign-key foreignTable="product" name="fk_feature_prod_product_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="product_id" />
</foreign-key>
<foreign-key foreignTable="feature" name="fk_feature_prod_feature_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="feature_id" />
</foreign-key>
<foreign-key foreignTable="feature_av" name="fk_feature_prod_feature_av_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="feature_av_id" />
</foreign-key>
<index name="idx_feature_prod_product_id">
<index-column name="product_id" />
</index>
<index name="idx_feature_prod_feature_id">
<index-column name="feature_id" />
</index>
<index name="idx_feature_prod_feature_av_id">
<index-column name="feature_av_id" />
</index>
<behavior name="timestampable" />
</table>
<table isCrossRef="true" name="feature_category" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="feature_id" required="true" type="INTEGER" />
<column name="category_id" required="true" type="INTEGER" />
<foreign-key foreignTable="category" name="fk_feature_category_category_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="category_id" />
</foreign-key>
<foreign-key foreignTable="feature" name="fk_feature_category_feature_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="feature_id" />
</foreign-key>
<index name="idx_feature_category_category_id">
<index-column name="category_id" />
</index>
<index name="idx_feature_category_feature_id">
<index-column name="feature_id" />
</index>
<behavior name="timestampable" />
</table>
<table name="attribute" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="position" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
</table>
<table name="attribute_av" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="attribute_id" required="true" type="INTEGER" />
<column name="position" required="true" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<foreign-key foreignTable="attribute" name="fk_attribute_av_attribute_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="attribute_id" />
</foreign-key>
<index name="idx_attribute_av_attribute_id">
<index-column name="attribute_id" />
</index>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
</table>
<table name="attribute_combination" namespace="Thelia\Model">
<column name="attribute_id" primaryKey="true" required="true" type="INTEGER" />
<column name="attribute_av_id" primaryKey="true" required="true" type="INTEGER" />
<column name="product_sale_elements_id" primaryKey="true" required="true" type="INTEGER" />
<foreign-key foreignTable="attribute" name="fk_attribute_combination_attribute_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="attribute_id" />
</foreign-key>
<foreign-key foreignTable="attribute_av" name="fk_attribute_combination_attribute_av_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="attribute_av_id" />
</foreign-key>
<foreign-key foreignTable="product_sale_elements" name="fk_attribute_combination_product_sale_elements_id">
<reference foreign="id" local="product_sale_elements_id" />
</foreign-key>
<index name="idx_attribute_combination_attribute_id">
<index-column name="attribute_id" />
</index>
<index name="idx_attribute_combination_attribute_av_id">
<index-column name="attribute_av_id" />
</index>
<index name="idx_attribute_combination_product_sale_elements_id">
<index-column name="product_sale_elements_id" />
</index>
<behavior name="timestampable" />
</table>
<table name="product_sale_elements" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="product_id" required="true" type="INTEGER" />
<column name="quantity" required="true" type="FLOAT" />
<column defaultValue="0" name="promo" type="TINYINT" />
<column defaultValue="0" name="newness" type="TINYINT" />
<column name="weight" type="FLOAT" />
<foreign-key foreignTable="product" name="fk_product_sale_element_product_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="product_id" />
</foreign-key>
<index name="idx_product_sale_element_product_id">
<index-column name="product_id" />
</index>
<behavior name="timestampable" />
</table>
<table isCrossRef="true" name="attribute_category" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="category_id" required="true" type="INTEGER" />
<column name="attribute_id" required="true" type="INTEGER" />
<foreign-key foreignTable="category" name="fk_attribute_category_category_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="category_id" />
</foreign-key>
<foreign-key foreignTable="attribute" name="fk_attribute_category_attribute_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="attribute_id" />
</foreign-key>
<index name="idx_attribute_category_category_id">
<index-column name="category_id" />
</index>
<index name="idx_attribute_category_attribute_id">
<index-column name="attribute_id" />
</index>
<behavior name="timestampable" />
</table>
<table name="config" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="name" required="true" size="255" type="VARCHAR" />
<column name="value" required="true" size="255" type="VARCHAR" />
<column defaultValue="1" name="secured" required="true" type="TINYINT" />
<column defaultValue="1" name="hidden" required="true" type="TINYINT" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<unique name="name_UNIQUE">
<unique-column name="name" />
</unique>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
</table>
<table name="customer" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="ref" required="true" size="50" type="VARCHAR" />
<column name="title_id" required="true" type="INTEGER" />
<column name="firstname" required="true" size="255" type="VARCHAR" />
<column name="lastname" required="true" size="255" type="VARCHAR" />
<column name="email" size="50" type="VARCHAR" />
<column name="password" size="255" type="VARCHAR" />
<column name="algo" size="128" type="VARCHAR" />
<column name="reseller" type="TINYINT" />
<column name="lang" size="10" type="VARCHAR" />
<column name="sponsor" size="50" type="VARCHAR" />
<column name="discount" type="FLOAT" />
<foreign-key foreignTable="customer_title" name="fk_customer_customer_title_id" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference foreign="id" local="title_id" />
</foreign-key>
<unique name="ref_UNIQUE">
<unique-column name="ref" />
</unique>
<index name="idx_customer_customer_title_id">
<index-column name="title_id" />
</index>
<behavior name="timestampable" />
</table>
<table name="address" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="label" size="255" type="VARCHAR" />
<column name="customer_id" required="true" type="INTEGER" />
<column name="title_id" required="true" type="INTEGER" />
<column name="company" size="255" type="VARCHAR" />
<column name="firstname" required="true" size="255" type="VARCHAR" />
<column name="lastname" required="true" size="255" type="VARCHAR" />
<column name="address1" required="true" size="255" type="VARCHAR" />
<column name="address2" required="true" size="255" type="VARCHAR" />
<column name="address3" required="true" size="255" type="VARCHAR" />
<column name="zipcode" required="true" size="10" type="VARCHAR" />
<column name="city" required="true" size="255" type="VARCHAR" />
<column name="country_id" required="true" type="INTEGER" />
<column name="phone" size="20" type="VARCHAR" />
<column name="cellphone" size="20" type="VARCHAR" />
<column defaultValue="0" name="is_default" type="TINYINT" />
<foreign-key foreignTable="customer" name="fk_address_customer_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="customer_id" />
</foreign-key>
<foreign-key foreignTable="customer_title" name="fk_address_customer_title_id" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference foreign="id" local="title_id" />
</foreign-key>
<foreign-key foreignTable="country" name="fk_address_country_id" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference foreign="id" local="country_id" />
</foreign-key>
<index name="idx_address_customer_id">
<index-column name="customer_id" />
</index>
<index name="idx_address_customer_title_id">
<index-column name="title_id" />
</index>
<index name="idx_address_country_id">
<index-column name="country_id" />
</index>
<behavior name="timestampable" />
</table>
<table name="customer_title" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column defaultValue="0" name="by_default" required="true" type="INTEGER" />
<column name="position" required="true" size="45" type="VARCHAR" />
<column name="short" size="10" type="VARCHAR" />
<column name="long" size="45" type="VARCHAR" />
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="short, long" />
</behavior>
</table>
<table name="lang" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="title" size="100" type="VARCHAR" />
<column name="code" size="10" type="VARCHAR" />
<column name="locale" size="45" type="VARCHAR" />
<column name="url" size="255" type="VARCHAR" />
<column name="date_format" size="45" type="VARCHAR" />
<column name="time_format" size="45" type="VARCHAR" />
<column name="datetime_format" size="45" type="VARCHAR" />
<column name="decimal_separator" size="45" type="VARCHAR" />
<column name="thousands_separator" size="45" type="VARCHAR" />
<column name="decimals" size="45" type="VARCHAR" />
<column name="by_default" type="TINYINT" />
<column name="position" type="INTEGER" />
<behavior name="timestampable" />
</table>
<table name="folder" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="parent" required="true" type="INTEGER" />
<column name="visible" type="TINYINT" />
<column name="position" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
<behavior name="versionable">
<parameter name="log_created_at" value="true" />
<parameter name="log_created_by" value="true" />
</behavior>
</table>
<table name="content" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="visible" type="TINYINT" />
<column name="position" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
<behavior name="versionable">
<parameter name="log_created_at" value="true" />
<parameter name="log_created_by" value="true" />
</behavior>
</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" />
<column name="file" required="true" size="255" type="VARCHAR" />
<column name="position" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<foreign-key foreignTable="product" name="fk_product_image_product_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="product_id" />
</foreign-key>
<index name="idx_product_image_product_id">
<index-column name="product_id" />
</index>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
</table>
<table name="product_document" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="product_id" required="true" type="INTEGER" />
<column name="file" required="true" size="255" type="VARCHAR" />
<column name="position" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<foreign-key foreignTable="product" name="fk_product_document_product_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="product_id" />
</foreign-key>
<index name="idx_product_document_product_id">
<index-column name="product_id" />
</index>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
</table>
<table name="order" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="ref" size="45" type="VARCHAR" />
<column name="customer_id" required="true" type="INTEGER" />
<column name="address_invoice" type="INTEGER" />
<column name="address_delivery" type="INTEGER" />
<column name="invoice_date" type="DATE" />
<column name="currency_id" type="INTEGER" />
<column name="currency_rate" required="true" type="FLOAT" />
<column name="transaction" size="100" type="VARCHAR" />
<column name="delivery_num" size="100" type="VARCHAR" />
<column name="invoice" size="100" type="VARCHAR" />
<column name="postage" type="FLOAT" />
<column name="payment" required="true" size="45" type="VARCHAR" />
<column name="carrier" required="true" size="45" type="VARCHAR" />
<column name="status_id" type="INTEGER" />
<column name="lang" required="true" size="10" type="VARCHAR" />
<foreign-key foreignTable="currency" name="fk_order_currency_id" onDelete="SET NULL" onUpdate="RESTRICT">
<reference foreign="id" local="currency_id" />
</foreign-key>
<foreign-key foreignTable="customer" name="fk_order_customer_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="customer_id" />
</foreign-key>
<foreign-key foreignTable="order_address" name="fk_order_address_invoice" onDelete="SET NULL" onUpdate="RESTRICT">
<reference foreign="id" local="address_invoice" />
</foreign-key>
<foreign-key foreignTable="order_address" name="fk_order_address_delivery" onDelete="SET NULL" onUpdate="RESTRICT">
<reference foreign="id" local="address_delivery" />
</foreign-key>
<foreign-key foreignTable="order_status" name="fk_order_status_id" onDelete="SET NULL" onUpdate="RESTRICT">
<reference foreign="id" local="status_id" />
</foreign-key>
<index name="idx_order_currency_id">
<index-column name="currency_id" />
</index>
<index name="idx_order_customer_id">
<index-column name="customer_id" />
</index>
<index name="idx_order_address_invoice">
<index-column name="address_invoice" />
</index>
<index name="idx_order_address_delivery">
<index-column name="address_delivery" />
</index>
<index name="idx_order_status_id">
<index-column name="status_id" />
</index>
<behavior name="timestampable" />
</table>
<table name="currency" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="name" size="45" type="VARCHAR" />
<column name="code" size="45" type="VARCHAR" />
<column name="symbol" size="45" type="VARCHAR" />
<column name="rate" type="FLOAT" />
<column name="position" type="INTEGER" />
<column name="by_default" type="TINYINT" />
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="name" />
</behavior>
</table>
<table name="order_address" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="customer_title_id" type="INTEGER" />
<column name="company" size="255" type="VARCHAR" />
<column name="firstname" required="true" size="255" type="VARCHAR" />
<column name="lastname" required="true" size="255" type="VARCHAR" />
<column name="address1" required="true" size="255" type="VARCHAR" />
<column name="address2" size="255" type="VARCHAR" />
<column name="address3" size="255" type="VARCHAR" />
<column name="zipcode" required="true" size="10" type="VARCHAR" />
<column name="city" required="true" size="255" type="VARCHAR" />
<column name="phone" size="20" type="VARCHAR" />
<column name="country_id" required="true" type="INTEGER" />
<behavior name="timestampable" />
</table>
<table name="order_product" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="order_id" required="true" type="INTEGER" />
<column name="product_ref" size="255" type="VARCHAR" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="LONGVARCHAR" />
<column name="chapo" type="LONGVARCHAR" />
<column name="quantity" required="true" type="FLOAT" />
<column name="price" required="true" type="FLOAT" />
<column name="tax" type="FLOAT" />
<column name="parent" type="INTEGER" />
<foreign-key foreignTable="order" name="fk_order_product_order_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="order_id" />
</foreign-key>
<index name="idx_order_product_order_id">
<index-column name="order_id" />
</index>
<behavior name="timestampable" />
</table>
<table name="order_status" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="code" size="45" type="VARCHAR" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
</table>
<table name="order_feature" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="order_product_id" required="true" type="INTEGER" />
<column name="feature_desc" size="255" type="VARCHAR" />
<column name="feature_av_desc" size="255" type="VARCHAR" />
<foreign-key foreignTable="order_product" name="fk_order_feature_order_product_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="order_product_id" />
</foreign-key>
<index name="idx_order_feature_order_product_id">
<index-column name="order_product_id" />
</index>
<behavior name="timestampable" />
</table>
<table name="module" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="code" required="true" size="55" type="VARCHAR" />
<column name="type" required="true" type="TINYINT" />
<column name="activate" type="TINYINT" />
<column name="position" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<column name="full_namespace" size="255" type="VARCHAR" />
<unique name="code_UNIQUE">
<unique-column name="code" />
</unique>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
</table>
<table isCrossRef="true" name="accessory" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="product_id" required="true" type="INTEGER" />
<column name="accessory" required="true" type="INTEGER" />
<column name="position" required="true" type="INTEGER" />
<foreign-key foreignTable="product" name="fk_accessory_product_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="product_id" />
</foreign-key>
<foreign-key foreignTable="product" name="fk_accessory_accessory" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="accessory" />
</foreign-key>
<index name="idx_address_product_id">
<index-column name="product_id" />
</index>
<index name="idx_address_accessory">
<index-column name="accessory" />
</index>
<behavior name="timestampable" />
</table>
<table name="area" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="name" required="true" size="100" type="VARCHAR" />
<column name="unit" type="FLOAT" />
<behavior name="timestampable" />
</table>
<table name="delivzone" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="area_id" type="INTEGER" />
<column name="delivery" required="true" size="45" type="VARCHAR" />
<foreign-key foreignTable="area" name="fk_delivzone_area_id" onDelete="SET NULL" onUpdate="RESTRICT">
<reference foreign="id" local="area_id" />
</foreign-key>
<index name="idx_delivzone_area_id">
<index-column name="area_id" />
</index>
<behavior name="timestampable" />
</table>
<table name="group" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="code" required="true" size="30" type="VARCHAR" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<unique name="code_UNIQUE">
<unique-column name="code" />
</unique>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
</table>
<table name="resource" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="code" required="true" size="30" type="VARCHAR" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<unique name="code_UNIQUE">
<unique-column name="code" />
</unique>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
</table>
<table name="admin" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="firstname" required="true" size="100" type="VARCHAR" />
<column name="lastname" required="true" size="100" type="VARCHAR" />
<column name="login" required="true" size="100" type="VARCHAR" />
<column name="password" required="true" size="128" type="VARCHAR" />
<column name="algo" size="128" type="VARCHAR" />
<column name="salt" size="128" type="VARCHAR" />
<behavior name="timestampable" />
</table>
<table isCrossRef="true" name="admin_group" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="group_id" primaryKey="true" required="true" type="INTEGER" />
<column name="admin_id" primaryKey="true" required="true" type="INTEGER" />
<foreign-key foreignTable="group" name="fk_admin_group_group_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="group_id" />
</foreign-key>
<foreign-key foreignTable="admin" name="fk_admin_group_admin_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="admin_id" />
</foreign-key>
<index name="idx_admin_group_group_id">
<index-column name="group_id" />
</index>
<index name="idx_admin_group_admin_id">
<index-column name="admin_id" />
</index>
<behavior name="timestampable" />
</table>
<table isCrossRef="true" name="group_resource" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="group_id" primaryKey="true" required="true" type="INTEGER" />
<column name="resource_id" primaryKey="true" required="true" type="INTEGER" />
<column defaultValue="0" name="read" type="TINYINT" />
<column defaultValue="0" name="write" type="TINYINT" />
<foreign-key foreignTable="group" name="fk_group_resource_group_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="group_id" />
</foreign-key>
<foreign-key foreignTable="resource" name="fk_group_resource_resource_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="resource_id" />
</foreign-key>
<index name="id_group_resource_group_id">
<index-column name="group_id" />
</index>
<index name="idx_group_resource_resource_id">
<index-column name="resource_id" />
</index>
<behavior name="timestampable" />
</table>
<table name="group_module" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="group_id" required="true" type="INTEGER" />
<column name="module_id" type="INTEGER" />
<column defaultValue="0" name="access" type="TINYINT" />
<foreign-key foreignTable="group" name="fk_group_module_group_id" onDelete="CASCADE" onUpdate="CASCADE">
<reference foreign="id" local="group_id" />
</foreign-key>
<foreign-key foreignTable="module" name="fk_group_module_module_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="module_id" />
</foreign-key>
<index name="idx_group_module_group_id">
<index-column name="group_id" />
</index>
<index name="idx_group_module_module_id">
<index-column name="module_id" />
</index>
<behavior name="timestampable" />
</table>
<table name="message" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="name" required="true" size="255" type="VARCHAR" />
<column name="secured" type="TINYINT" />
<column name="title" type="LONGVARCHAR" />
<column name="subject" type="LONGVARCHAR" />
<column name="text_message" type="CLOB" />
<column name="html_message" type="CLOB" />
<unique name="name_UNIQUE">
<unique-column name="name" />
</unique>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, subject, text_message, html_message" />
</behavior>
<behavior name="versionable">
<parameter name="log_created_at" value="true" />
<parameter name="log_created_by" value="true" />
</behavior>
</table>
<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="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="amount" required="true" type="FLOAT" />
<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" />
<column name="is_cumulative" required="true" type="TINYINT" />
<column name="is_removing_postage" required="true" type="TINYINT" />
<column name="max_usage" required="true" type="INTEGER" />
<column name="is_available_on_special_offers" required="true" type="BOOLEAN" />
<unique name="code_UNIQUE">
<unique-column name="code" />
</unique>
<index name="idx_is_enabled">
<index-column name="is_enabled" />
</index>
<index name="idx_is_used">
<index-column name="is_used" />
</index>
<index name="idx_type">
<index-column name="type" />
</index>
<index name="idx_amount">
<index-column name="amount" />
</index>
<index name="idx_expiration_date">
<index-column name="expiration_date" />
</index>
<index name="idx_is_cumulative">
<index-column name="is_cumulative" />
</index>
<index name="idx_is_removing_postage">
<index-column name="is_removing_postage" />
</index>
<index name="idx_max_usage">
<index-column name="max_usage" />
</index>
<index name="idx_is_available_on_special_offers">
<index-column name="is_available_on_special_offers" />
</index>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, short_description, description" />
</behavior>
<behavior name="versionable" />
</table>
<table name="coupon_order" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="order_id" required="true" type="INTEGER" />
<column name="value" required="true" type="FLOAT" />
<foreign-key foreignTable="order" name="fk_coupon_order_order_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="order_id" />
</foreign-key>
<index name="idx_coupon_order_order_id">
<index-column name="order_id" />
</index>
<behavior name="timestampable" />
</table>
<table name="admin_log" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="admin_login" size="255" type="VARCHAR" />
<column name="admin_firstname" size="255" type="VARCHAR" />
<column name="admin_lastname" size="255" type="VARCHAR" />
<column name="action" size="255" type="VARCHAR" />
<column name="request" type="LONGVARCHAR" />
<behavior name="timestampable" />
</table>
<table isCrossRef="true" name="content_folder" namespace="Thelia\Model">
<column name="content_id" primaryKey="true" required="true" type="INTEGER" />
<column name="folder_id" primaryKey="true" required="true" type="INTEGER" />
<foreign-key foreignTable="content" name="fk_content_folder_content_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="content_id" />
</foreign-key>
<foreign-key foreignTable="folder" name="fk_content_folder_folder_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="folder_id" />
</foreign-key>
<index name="idx_content_folder_content_id">
<index-column name="content_id" />
</index>
<index name="idx_content_folder_folder_id">
<index-column name="folder_id" />
</index>
<behavior name="timestampable" />
</table>
<table name="cart" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="token" size="255" type="VARCHAR" />
<column name="customer_id" type="INTEGER" />
<column name="address_delivery_id" type="INTEGER" />
<column name="address_invoice_id" type="INTEGER" />
<column name="currency_id" type="INTEGER" />
<foreign-key foreignTable="customer" name="fk_cart_customer_id">
<reference foreign="id" local="customer_id" />
</foreign-key>
<foreign-key foreignTable="address" name="fk_cart_address_delivery_id">
<reference foreign="id" local="address_delivery_id" />
</foreign-key>
<foreign-key foreignTable="address" name="fk_cart_address_invoice_id">
<reference foreign="id" local="address_invoice_id" />
</foreign-key>
<foreign-key foreignTable="currency" name="fk_cart_currency_id">
<reference foreign="id" local="currency_id" />
</foreign-key>
<index name="idx_cart_customer_id">
<index-column name="customer_id" />
</index>
<index name="idx_cart_address_delivery_id">
<index-column name="address_delivery_id" />
</index>
<index name="idx_cart_address_invoice_id">
<index-column name="address_invoice_id" />
</index>
<index name="idx_cart_currency_id">
<index-column name="currency_id" />
</index>
<unique name="token_UNIQUE">
<unique-column name="token" />
</unique>
<behavior name="timestampable" />
</table>
<table name="cart_item" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="cart_id" required="true" type="INTEGER" />
<column name="product_id" required="true" type="INTEGER" />
<column defaultValue="1" name="quantity" type="FLOAT" />
<column name="product_sale_elements_id" required="true" type="INTEGER" />
<column name="price" type="FLOAT" />
<column name="promo_price" type="FLOAT" />
<column name="price_end_of_life" type="TIMESTAMP" />
<foreign-key foreignTable="cart" name="fk_cart_item_cart_id">
<reference foreign="id" local="cart_id" />
</foreign-key>
<foreign-key foreignTable="product" name="fk_cart_item_product_id">
<reference foreign="id" local="product_id" />
</foreign-key>
<foreign-key foreignTable="product_sale_elements" name="fk_cart_item_product_sale_elements_id">
<reference foreign="id" local="product_sale_elements_id" />
</foreign-key>
<index name="idx_cart_item_cart_id">
<index-column name="cart_id" />
</index>
<index name="idx_cart_item_product_id">
<index-column name="product_id" />
</index>
<index name="idx_cart_item_product_sale_elements_id">
<index-column name="product_sale_elements_id" />
</index>
<behavior name="timestampable" />
</table>
<table name="product_price" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="product_sale_elements_id" required="true" type="INTEGER" />
<column name="currency_id" required="true" type="INTEGER" />
<column name="price" required="true" type="FLOAT" />
<column name="promo_price" type="FLOAT" />
<foreign-key foreignTable="product_sale_elements" name="fk_product_price_product_sale_elements_id" onDelete="CASCADE">
<reference foreign="id" local="product_sale_elements_id" />
</foreign-key>
<foreign-key foreignTable="currency" name="fk_product_price_currency_id" onDelete="CASCADE">
<reference foreign="id" local="currency_id" />
</foreign-key>
<index name="idx_product_price_product_sale_elements_id">
<index-column name="product_sale_elements_id" />
</index>
<index name="idx_product_price_currency_id">
<index-column name="currency_id" />
</index>
<behavior name="timestampable" />
</table>
<table name="category_image" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="category_id" required="true" type="INTEGER" />
<column name="file" required="true" size="255" type="VARCHAR" />
<column name="position" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<foreign-key foreignTable="category" name="fk_category_image_category_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="category_id" />
</foreign-key>
<index name="idx_category_image_category_id">
<index-column name="category_id" />
</index>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
</table>
<table name="folder_image" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="folder_id" required="true" type="INTEGER" />
<column name="file" required="true" size="255" type="VARCHAR" />
<column name="position" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<foreign-key foreignTable="folder" name="fk_folder_image_folder_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="folder_id" />
</foreign-key>
<index name="idx_folder_image_folder_id">
<index-column name="folder_id" />
</index>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
</table>
<table name="content_image" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="content_id" required="true" type="INTEGER" />
<column name="file" required="true" size="255" type="VARCHAR" />
<column name="position" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<foreign-key foreignTable="content" name="fk_content_image_content_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="content_id" />
</foreign-key>
<index name="idx_content_image_content_id">
<index-column name="content_id" />
</index>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
</table>
<table name="category_document" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="category_id" required="true" type="INTEGER" />
<column name="file" required="true" size="255" type="VARCHAR" />
<column name="position" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<foreign-key foreignTable="category" name="fk_catgory_document_category_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="category_id" />
</foreign-key>
<index name="idx_category_document_category_id">
<index-column name="category_id" />
</index>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
</table>
<table name="content_document" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="content_id" required="true" type="INTEGER" />
<column name="file" required="true" size="255" type="VARCHAR" />
<column name="position" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<foreign-key foreignTable="content" name="fk_content_document_content_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="content_id" />
</foreign-key>
<index name="idx_content_document_content_id">
<index-column name="content_id" />
</index>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
</behavior>
</table>
<table name="folder_document" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="folder_id" required="true" type="INTEGER" />
<column name="file" required="true" size="255" type="VARCHAR" />
<column name="position" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" />
<column name="description" type="CLOB" />
<column name="chapo" type="LONGVARCHAR" />
<column name="postscriptum" type="LONGVARCHAR" />
<foreign-key foreignTable="folder" name="fk_folder_document_folder_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="folder_id" />
</foreign-key>
<index name="idx_folder_document_folder_id">
<index-column name="folder_id" />
</index>
<behavior name="timestampable" />
<behavior name="i18n">
<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>
<table name="rewriting_url" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="url" required="true" size="255" type="VARCHAR" />
<column name="view" size="255" type="VARCHAR" />
<column name="view_id" size="255" type="VARCHAR" />
<column name="view_locale" size="255" type="VARCHAR" />
<column name="redirected" type="INTEGER" />
<foreign-key foreignTable="rewriting_url" name="fk_rewriting_url_redirected" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference foreign="id" local="redirected" />
</foreign-key>
<unique name="url_UNIQUE">
<unique-column name="url" />
</unique>
<index name="idx_view_id">
<index-column name="view_id" />
</index>
<index name="idx_rewriting_url_redirected">
<index-column name="redirected" />
</index>
<behavior name="timestampable" />
</table>
<table name="rewriting_argument" namespace="Thelia\Model">
<column name="rewriting_url_id" primaryKey="true" required="true" type="INTEGER" />
<column name="parameter" primaryKey="true" required="true" size="255" type="VARCHAR" />
<column name="value" primaryKey="true" required="true" size="255" type="VARCHAR" />
<foreign-key foreignTable="rewriting_url" name="fk_rewriting_argument_rewirting_url_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="rewriting_url_id" />
</foreign-key>
<index name="idx_rewriting_argument_rewirting_url_id">
<index-column name="rewriting_url_id" />
</index>
<behavior name="timestampable" />
</table>
</database>