123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536 |
- <?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="customer_entity" resource="default" engine="innodb" comment="Customer Entity">
- <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
- comment="Entity ID"/>
- <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="true" identity="false"
- comment="Website ID"/>
- <column xsi:type="varchar" name="email" nullable="true" length="255" comment="Email"/>
- <column xsi:type="smallint" name="group_id" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Group ID"/>
- <column xsi:type="varchar" name="increment_id" nullable="true" length="50" comment="Increment 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="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
- comment="Created At"/>
- <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
- comment="Updated At"/>
- <column xsi:type="smallint" name="is_active" padding="5" unsigned="true" nullable="false" identity="false"
- default="1" comment="Is Active"/>
- <column xsi:type="smallint" name="disable_auto_group_change" padding="5" unsigned="true" nullable="false"
- identity="false" default="0" comment="Disable automatic group change based on VAT ID"/>
- <column xsi:type="varchar" name="created_in" nullable="true" length="255" comment="Created From"/>
- <column xsi:type="varchar" name="prefix" nullable="true" length="40" comment="Name Prefix"/>
- <column xsi:type="varchar" name="firstname" nullable="true" length="255" comment="First Name"/>
- <column xsi:type="varchar" name="middlename" nullable="true" length="255" comment="Middle Name/Initial"/>
- <column xsi:type="varchar" name="lastname" nullable="true" length="255" comment="Last Name"/>
- <column xsi:type="varchar" name="suffix" nullable="true" length="40" comment="Name Suffix"/>
- <column xsi:type="date" name="dob" comment="Date of Birth"/>
- <column xsi:type="varchar" name="password_hash" nullable="true" length="128" comment="Password_hash"/>
- <column xsi:type="varchar" name="rp_token" nullable="true" length="128" comment="Reset password token"/>
- <column xsi:type="datetime" name="rp_token_created_at" on_update="false" nullable="true"
- comment="Reset password token creation time"/>
- <column xsi:type="int" name="default_billing" padding="10" unsigned="true" nullable="true" identity="false"
- comment="Default Billing Address"/>
- <column xsi:type="int" name="default_shipping" padding="10" unsigned="true" nullable="true" identity="false"
- comment="Default Shipping Address"/>
- <column xsi:type="varchar" name="taxvat" nullable="true" length="50" comment="Tax/VAT Number"/>
- <column xsi:type="varchar" name="confirmation" nullable="true" length="64" comment="Is Confirmed"/>
- <column xsi:type="smallint" name="gender" padding="5" unsigned="true" nullable="true" identity="false"
- comment="Gender"/>
- <column xsi:type="smallint" name="failures_num" padding="6" unsigned="false" nullable="true" identity="false"
- default="0" comment="Failure Number"/>
- <column xsi:type="timestamp" name="first_failure" on_update="false" nullable="true" comment="First Failure"/>
- <column xsi:type="timestamp" name="lock_expires" on_update="false" nullable="true"
- comment="Lock Expiration Date"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="entity_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="CUSTOMER_ENTITY_STORE_ID_STORE_STORE_ID" table="customer_entity"
- column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="SET NULL"/>
- <constraint xsi:type="foreign" referenceId="CUSTOMER_ENTITY_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID"
- table="customer_entity" column="website_id" referenceTable="store_website"
- referenceColumn="website_id" onDelete="SET NULL"/>
- <constraint xsi:type="unique" referenceId="CUSTOMER_ENTITY_EMAIL_WEBSITE_ID">
- <column name="email"/>
- <column name="website_id"/>
- </constraint>
- <index referenceId="CUSTOMER_ENTITY_STORE_ID" indexType="btree">
- <column name="store_id"/>
- </index>
- <index referenceId="CUSTOMER_ENTITY_WEBSITE_ID" indexType="btree">
- <column name="website_id"/>
- </index>
- <index referenceId="CUSTOMER_ENTITY_FIRSTNAME" indexType="btree">
- <column name="firstname"/>
- </index>
- <index referenceId="CUSTOMER_ENTITY_LASTNAME" indexType="btree">
- <column name="lastname"/>
- </index>
- </table>
- <table name="customer_address_entity" resource="default" engine="innodb" comment="Customer Address Entity">
- <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
- comment="Entity ID"/>
- <column xsi:type="varchar" name="increment_id" nullable="true" length="50" comment="Increment Id"/>
- <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="true" identity="false"
- comment="Parent ID"/>
- <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
- comment="Created At"/>
- <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
- comment="Updated At"/>
- <column xsi:type="smallint" name="is_active" padding="5" unsigned="true" nullable="false" identity="false"
- default="1" comment="Is Active"/>
- <column xsi:type="varchar" name="city" nullable="false" length="255" comment="City"/>
- <column xsi:type="varchar" name="company" nullable="true" length="255" comment="Company"/>
- <column xsi:type="varchar" name="country_id" nullable="false" length="255" comment="Country"/>
- <column xsi:type="varchar" name="fax" nullable="true" length="255" comment="Fax"/>
- <column xsi:type="varchar" name="firstname" nullable="false" length="255" comment="First Name"/>
- <column xsi:type="varchar" name="lastname" nullable="false" length="255" comment="Last Name"/>
- <column xsi:type="varchar" name="middlename" nullable="true" length="255" comment="Middle Name"/>
- <column xsi:type="varchar" name="postcode" nullable="true" length="255" comment="Zip/Postal Code"/>
- <column xsi:type="varchar" name="prefix" nullable="true" length="40" comment="Name Prefix"/>
- <column xsi:type="varchar" name="region" nullable="true" length="255" comment="State/Province"/>
- <column xsi:type="int" name="region_id" padding="10" unsigned="true" nullable="true" identity="false"
- comment="State/Province"/>
- <column xsi:type="text" name="street" nullable="false" comment="Street Address"/>
- <column xsi:type="varchar" name="suffix" nullable="true" length="40" comment="Name Suffix"/>
- <column xsi:type="varchar" name="telephone" nullable="false" length="255" comment="Phone Number"/>
- <column xsi:type="varchar" name="vat_id" nullable="true" length="255" comment="VAT number"/>
- <column xsi:type="int" name="vat_is_valid" padding="10" unsigned="true" nullable="true" identity="false"
- comment="VAT number validity"/>
- <column xsi:type="varchar" name="vat_request_date" nullable="true" length="255"
- comment="VAT number validation request date"/>
- <column xsi:type="varchar" name="vat_request_id" nullable="true" length="255"
- comment="VAT number validation request ID"/>
- <column xsi:type="int" name="vat_request_success" padding="10" unsigned="true" nullable="true" identity="false"
- comment="VAT number validation request success"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="entity_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="CUSTOMER_ADDRESS_ENTITY_PARENT_ID_CUSTOMER_ENTITY_ENTITY_ID"
- table="customer_address_entity" column="parent_id" referenceTable="customer_entity"
- referenceColumn="entity_id" onDelete="CASCADE"/>
- <index referenceId="CUSTOMER_ADDRESS_ENTITY_PARENT_ID" indexType="btree">
- <column name="parent_id"/>
- </index>
- </table>
- <table name="customer_address_entity_datetime" resource="default" engine="innodb"
- comment="Customer Address Entity Datetime">
- <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
- comment="Value Id"/>
- <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Attribute Id"/>
- <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Entity ID"/>
- <column xsi:type="datetime" name="value" on_update="false" nullable="true" comment="Value"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="value_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="CSTR_ADDR_ENTT_DTIME_ATTR_ID_EAV_ATTR_ATTR_ID"
- table="customer_address_entity_datetime" column="attribute_id" referenceTable="eav_attribute"
- referenceColumn="attribute_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="CSTR_ADDR_ENTT_DTIME_ENTT_ID_CSTR_ADDR_ENTT_ENTT_ID"
- table="customer_address_entity_datetime" column="entity_id" referenceTable="customer_address_entity"
- referenceColumn="entity_id" onDelete="CASCADE"/>
- <constraint xsi:type="unique" referenceId="CUSTOMER_ADDRESS_ENTITY_DATETIME_ENTITY_ID_ATTRIBUTE_ID">
- <column name="entity_id"/>
- <column name="attribute_id"/>
- </constraint>
- <index referenceId="CUSTOMER_ADDRESS_ENTITY_DATETIME_ATTRIBUTE_ID" indexType="btree">
- <column name="attribute_id"/>
- </index>
- <index referenceId="CUSTOMER_ADDRESS_ENTITY_DATETIME_ENTITY_ID_ATTRIBUTE_ID_VALUE" indexType="btree">
- <column name="entity_id"/>
- <column name="attribute_id"/>
- <column name="value"/>
- </index>
- </table>
- <table name="customer_address_entity_decimal" resource="default" engine="innodb"
- comment="Customer Address Entity Decimal">
- <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
- comment="Value Id"/>
- <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Attribute Id"/>
- <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Entity ID"/>
- <column xsi:type="decimal" name="value" scale="4" precision="12" unsigned="false" nullable="false" default="0"
- comment="Value"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="value_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="CSTR_ADDR_ENTT_DEC_ATTR_ID_EAV_ATTR_ATTR_ID"
- table="customer_address_entity_decimal" column="attribute_id" referenceTable="eav_attribute"
- referenceColumn="attribute_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="CSTR_ADDR_ENTT_DEC_ENTT_ID_CSTR_ADDR_ENTT_ENTT_ID"
- table="customer_address_entity_decimal" column="entity_id" referenceTable="customer_address_entity"
- referenceColumn="entity_id" onDelete="CASCADE"/>
- <constraint xsi:type="unique" referenceId="CUSTOMER_ADDRESS_ENTITY_DECIMAL_ENTITY_ID_ATTRIBUTE_ID">
- <column name="entity_id"/>
- <column name="attribute_id"/>
- </constraint>
- <index referenceId="CUSTOMER_ADDRESS_ENTITY_DECIMAL_ATTRIBUTE_ID" indexType="btree">
- <column name="attribute_id"/>
- </index>
- <index referenceId="CUSTOMER_ADDRESS_ENTITY_DECIMAL_ENTITY_ID_ATTRIBUTE_ID_VALUE" indexType="btree">
- <column name="entity_id"/>
- <column name="attribute_id"/>
- <column name="value"/>
- </index>
- </table>
- <table name="customer_address_entity_int" resource="default" engine="innodb" comment="Customer Address Entity Int">
- <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
- comment="Value ID"/>
- <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Attribute ID"/>
- <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Entity ID"/>
- <column xsi:type="int" name="value" padding="11" unsigned="false" nullable="false" identity="false" default="0"
- comment="Value"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="value_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="CSTR_ADDR_ENTT_INT_ATTR_ID_EAV_ATTR_ATTR_ID"
- table="customer_address_entity_int" column="attribute_id" referenceTable="eav_attribute"
- referenceColumn="attribute_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="CSTR_ADDR_ENTT_INT_ENTT_ID_CSTR_ADDR_ENTT_ENTT_ID"
- table="customer_address_entity_int" column="entity_id" referenceTable="customer_address_entity"
- referenceColumn="entity_id" onDelete="CASCADE"/>
- <constraint xsi:type="unique" referenceId="CUSTOMER_ADDRESS_ENTITY_INT_ENTITY_ID_ATTRIBUTE_ID">
- <column name="entity_id"/>
- <column name="attribute_id"/>
- </constraint>
- <index referenceId="CUSTOMER_ADDRESS_ENTITY_INT_ATTRIBUTE_ID" indexType="btree">
- <column name="attribute_id"/>
- </index>
- <index referenceId="CUSTOMER_ADDRESS_ENTITY_INT_ENTITY_ID_ATTRIBUTE_ID_VALUE" indexType="btree">
- <column name="entity_id"/>
- <column name="attribute_id"/>
- <column name="value"/>
- </index>
- </table>
- <table name="customer_address_entity_text" resource="default" engine="innodb"
- comment="Customer Address Entity Text">
- <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
- comment="Value ID"/>
- <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Attribute ID"/>
- <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Entity ID"/>
- <column xsi:type="text" name="value" nullable="false" comment="Value"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="value_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="CSTR_ADDR_ENTT_TEXT_ATTR_ID_EAV_ATTR_ATTR_ID"
- table="customer_address_entity_text" column="attribute_id" referenceTable="eav_attribute"
- referenceColumn="attribute_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="CSTR_ADDR_ENTT_TEXT_ENTT_ID_CSTR_ADDR_ENTT_ENTT_ID"
- table="customer_address_entity_text" column="entity_id" referenceTable="customer_address_entity"
- referenceColumn="entity_id" onDelete="CASCADE"/>
- <constraint xsi:type="unique" referenceId="CUSTOMER_ADDRESS_ENTITY_TEXT_ENTITY_ID_ATTRIBUTE_ID">
- <column name="entity_id"/>
- <column name="attribute_id"/>
- </constraint>
- <index referenceId="CUSTOMER_ADDRESS_ENTITY_TEXT_ATTRIBUTE_ID" indexType="btree">
- <column name="attribute_id"/>
- </index>
- </table>
- <table name="customer_address_entity_varchar" resource="default" engine="innodb"
- comment="Customer Address Entity Varchar">
- <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
- comment="Value ID"/>
- <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Attribute ID"/>
- <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Entity ID"/>
- <column xsi:type="varchar" name="value" nullable="true" length="255" comment="Value"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="value_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="CSTR_ADDR_ENTT_VCHR_ATTR_ID_EAV_ATTR_ATTR_ID"
- table="customer_address_entity_varchar" column="attribute_id" referenceTable="eav_attribute"
- referenceColumn="attribute_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="CSTR_ADDR_ENTT_VCHR_ENTT_ID_CSTR_ADDR_ENTT_ENTT_ID"
- table="customer_address_entity_varchar" column="entity_id" referenceTable="customer_address_entity"
- referenceColumn="entity_id" onDelete="CASCADE"/>
- <constraint xsi:type="unique" referenceId="CUSTOMER_ADDRESS_ENTITY_VARCHAR_ENTITY_ID_ATTRIBUTE_ID">
- <column name="entity_id"/>
- <column name="attribute_id"/>
- </constraint>
- <index referenceId="CUSTOMER_ADDRESS_ENTITY_VARCHAR_ATTRIBUTE_ID" indexType="btree">
- <column name="attribute_id"/>
- </index>
- <index referenceId="CUSTOMER_ADDRESS_ENTITY_VARCHAR_ENTITY_ID_ATTRIBUTE_ID_VALUE" indexType="btree">
- <column name="entity_id"/>
- <column name="attribute_id"/>
- <column name="value"/>
- </index>
- </table>
- <table name="customer_entity_datetime" resource="default" engine="innodb" comment="Customer Entity Datetime">
- <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
- comment="Value ID"/>
- <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Attribute ID"/>
- <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Entity ID"/>
- <column xsi:type="datetime" name="value" on_update="false" nullable="true" comment="Value"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="value_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="CUSTOMER_ENTITY_DATETIME_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID"
- table="customer_entity_datetime" column="attribute_id" referenceTable="eav_attribute"
- referenceColumn="attribute_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="CUSTOMER_ENTITY_DATETIME_ENTITY_ID_CUSTOMER_ENTITY_ENTITY_ID"
- table="customer_entity_datetime" column="entity_id" referenceTable="customer_entity"
- referenceColumn="entity_id" onDelete="CASCADE"/>
- <constraint xsi:type="unique" referenceId="CUSTOMER_ENTITY_DATETIME_ENTITY_ID_ATTRIBUTE_ID">
- <column name="entity_id"/>
- <column name="attribute_id"/>
- </constraint>
- <index referenceId="CUSTOMER_ENTITY_DATETIME_ATTRIBUTE_ID" indexType="btree">
- <column name="attribute_id"/>
- </index>
- <index referenceId="CUSTOMER_ENTITY_DATETIME_ENTITY_ID_ATTRIBUTE_ID_VALUE" indexType="btree">
- <column name="entity_id"/>
- <column name="attribute_id"/>
- <column name="value"/>
- </index>
- </table>
- <table name="customer_entity_decimal" resource="default" engine="innodb" comment="Customer Entity Decimal">
- <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
- comment="Value ID"/>
- <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Attribute ID"/>
- <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Entity ID"/>
- <column xsi:type="decimal" name="value" scale="4" precision="12" unsigned="false" nullable="false" default="0"
- comment="Value"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="value_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="CUSTOMER_ENTITY_DECIMAL_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID"
- table="customer_entity_decimal" column="attribute_id" referenceTable="eav_attribute"
- referenceColumn="attribute_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="CUSTOMER_ENTITY_DECIMAL_ENTITY_ID_CUSTOMER_ENTITY_ENTITY_ID"
- table="customer_entity_decimal" column="entity_id" referenceTable="customer_entity"
- referenceColumn="entity_id" onDelete="CASCADE"/>
- <constraint xsi:type="unique" referenceId="CUSTOMER_ENTITY_DECIMAL_ENTITY_ID_ATTRIBUTE_ID">
- <column name="entity_id"/>
- <column name="attribute_id"/>
- </constraint>
- <index referenceId="CUSTOMER_ENTITY_DECIMAL_ATTRIBUTE_ID" indexType="btree">
- <column name="attribute_id"/>
- </index>
- <index referenceId="CUSTOMER_ENTITY_DECIMAL_ENTITY_ID_ATTRIBUTE_ID_VALUE" indexType="btree">
- <column name="entity_id"/>
- <column name="attribute_id"/>
- <column name="value"/>
- </index>
- </table>
- <table name="customer_entity_int" resource="default" engine="innodb" comment="Customer Entity Int">
- <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
- comment="Value ID"/>
- <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Attribute ID"/>
- <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Entity ID"/>
- <column xsi:type="int" name="value" padding="11" unsigned="false" nullable="false" identity="false" default="0"
- comment="Value"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="value_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="CUSTOMER_ENTITY_INT_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID"
- table="customer_entity_int" column="attribute_id" referenceTable="eav_attribute"
- referenceColumn="attribute_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="CUSTOMER_ENTITY_INT_ENTITY_ID_CUSTOMER_ENTITY_ENTITY_ID"
- table="customer_entity_int" column="entity_id" referenceTable="customer_entity"
- referenceColumn="entity_id" onDelete="CASCADE"/>
- <constraint xsi:type="unique" referenceId="CUSTOMER_ENTITY_INT_ENTITY_ID_ATTRIBUTE_ID">
- <column name="entity_id"/>
- <column name="attribute_id"/>
- </constraint>
- <index referenceId="CUSTOMER_ENTITY_INT_ATTRIBUTE_ID" indexType="btree">
- <column name="attribute_id"/>
- </index>
- <index referenceId="CUSTOMER_ENTITY_INT_ENTITY_ID_ATTRIBUTE_ID_VALUE" indexType="btree">
- <column name="entity_id"/>
- <column name="attribute_id"/>
- <column name="value"/>
- </index>
- </table>
- <table name="customer_entity_text" resource="default" engine="innodb" comment="Customer Entity Text">
- <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
- comment="Value ID"/>
- <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Attribute ID"/>
- <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Entity ID"/>
- <column xsi:type="text" name="value" nullable="false" comment="Value"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="value_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="CUSTOMER_ENTITY_TEXT_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID"
- table="customer_entity_text" column="attribute_id" referenceTable="eav_attribute"
- referenceColumn="attribute_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="CUSTOMER_ENTITY_TEXT_ENTITY_ID_CUSTOMER_ENTITY_ENTITY_ID"
- table="customer_entity_text" column="entity_id" referenceTable="customer_entity"
- referenceColumn="entity_id" onDelete="CASCADE"/>
- <constraint xsi:type="unique" referenceId="CUSTOMER_ENTITY_TEXT_ENTITY_ID_ATTRIBUTE_ID">
- <column name="entity_id"/>
- <column name="attribute_id"/>
- </constraint>
- <index referenceId="CUSTOMER_ENTITY_TEXT_ATTRIBUTE_ID" indexType="btree">
- <column name="attribute_id"/>
- </index>
- </table>
- <table name="customer_entity_varchar" resource="default" engine="innodb" comment="Customer Entity Varchar">
- <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
- comment="Value ID"/>
- <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Attribute ID"/>
- <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Entity ID"/>
- <column xsi:type="varchar" name="value" nullable="true" length="255" comment="Value"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="value_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="CUSTOMER_ENTITY_VARCHAR_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID"
- table="customer_entity_varchar" column="attribute_id" referenceTable="eav_attribute"
- referenceColumn="attribute_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="CUSTOMER_ENTITY_VARCHAR_ENTITY_ID_CUSTOMER_ENTITY_ENTITY_ID"
- table="customer_entity_varchar" column="entity_id" referenceTable="customer_entity"
- referenceColumn="entity_id" onDelete="CASCADE"/>
- <constraint xsi:type="unique" referenceId="CUSTOMER_ENTITY_VARCHAR_ENTITY_ID_ATTRIBUTE_ID">
- <column name="entity_id"/>
- <column name="attribute_id"/>
- </constraint>
- <index referenceId="CUSTOMER_ENTITY_VARCHAR_ATTRIBUTE_ID" indexType="btree">
- <column name="attribute_id"/>
- </index>
- <index referenceId="CUSTOMER_ENTITY_VARCHAR_ENTITY_ID_ATTRIBUTE_ID_VALUE" indexType="btree">
- <column name="entity_id"/>
- <column name="attribute_id"/>
- <column name="value"/>
- </index>
- </table>
- <table name="customer_group" resource="default" engine="innodb" comment="Customer Group">
- <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="true"/>
- <column xsi:type="varchar" name="customer_group_code" nullable="false" length="32"
- comment="Customer Group Code"/>
- <column xsi:type="int" name="tax_class_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Tax Class Id"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="customer_group_id"/>
- </constraint>
- </table>
- <table name="customer_eav_attribute" resource="default" engine="innodb" comment="Customer Eav Attribute">
- <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
- comment="Attribute Id"/>
- <column xsi:type="smallint" name="is_visible" padding="5" unsigned="true" nullable="false" identity="false"
- default="1" comment="Is Visible"/>
- <column xsi:type="varchar" name="input_filter" nullable="true" length="255" comment="Input Filter"/>
- <column xsi:type="smallint" name="multiline_count" padding="5" unsigned="true" nullable="false" identity="false"
- default="1" comment="Multiline Count"/>
- <column xsi:type="text" name="validate_rules" nullable="true" comment="Validate Rules"/>
- <column xsi:type="smallint" name="is_system" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Is System"/>
- <column xsi:type="int" name="sort_order" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Sort Order"/>
- <column xsi:type="varchar" name="data_model" nullable="true" length="255" comment="Data Model"/>
- <column xsi:type="smallint" name="is_used_in_grid" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Is Used in Grid"/>
- <column xsi:type="smallint" name="is_visible_in_grid" padding="5" unsigned="true" nullable="false"
- identity="false" default="0" comment="Is Visible in Grid"/>
- <column xsi:type="smallint" name="is_filterable_in_grid" padding="5" unsigned="true" nullable="false"
- identity="false" default="0" comment="Is Filterable in Grid"/>
- <column xsi:type="smallint" name="is_searchable_in_grid" padding="5" unsigned="true" nullable="false"
- identity="false" default="0" comment="Is Searchable in Grid"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="attribute_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="CUSTOMER_EAV_ATTRIBUTE_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID"
- table="customer_eav_attribute" column="attribute_id" referenceTable="eav_attribute"
- referenceColumn="attribute_id" onDelete="CASCADE"/>
- </table>
- <table name="customer_form_attribute" resource="default" engine="innodb" comment="Customer Form Attribute">
- <column xsi:type="varchar" name="form_code" nullable="false" length="32" comment="Form Code"/>
- <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
- comment="Attribute Id"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="form_code"/>
- <column name="attribute_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="CUSTOMER_FORM_ATTRIBUTE_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID"
- table="customer_form_attribute" column="attribute_id" referenceTable="eav_attribute"
- referenceColumn="attribute_id" onDelete="CASCADE"/>
- <index referenceId="CUSTOMER_FORM_ATTRIBUTE_ATTRIBUTE_ID" indexType="btree">
- <column name="attribute_id"/>
- </index>
- </table>
- <table name="customer_eav_attribute_website" resource="default" engine="innodb"
- comment="Customer Eav Attribute Website">
- <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
- comment="Attribute Id"/>
- <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
- comment="Website Id"/>
- <column xsi:type="smallint" name="is_visible" padding="5" unsigned="true" nullable="true" identity="false"
- comment="Is Visible"/>
- <column xsi:type="smallint" name="is_required" padding="5" unsigned="true" nullable="true" identity="false"
- comment="Is Required"/>
- <column xsi:type="text" name="default_value" nullable="true" comment="Default Value"/>
- <column xsi:type="smallint" name="multiline_count" padding="5" unsigned="true" nullable="true" identity="false"
- comment="Multiline Count"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="attribute_id"/>
- <column name="website_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="CSTR_EAV_ATTR_WS_ATTR_ID_EAV_ATTR_ATTR_ID"
- table="customer_eav_attribute_website" column="attribute_id" referenceTable="eav_attribute"
- referenceColumn="attribute_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="CSTR_EAV_ATTR_WS_WS_ID_STORE_WS_WS_ID"
- table="customer_eav_attribute_website" column="website_id" referenceTable="store_website"
- referenceColumn="website_id" onDelete="CASCADE"/>
- <index referenceId="CUSTOMER_EAV_ATTRIBUTE_WEBSITE_WEBSITE_ID" indexType="btree">
- <column name="website_id"/>
- </index>
- </table>
- <table name="customer_visitor" resource="default" engine="innodb" comment="Visitor Table">
- <column xsi:type="bigint" name="visitor_id" padding="20" unsigned="true" nullable="false" identity="true"
- comment="Visitor ID"/>
- <column xsi:type="int" name="customer_id" padding="11" unsigned="false" nullable="true" identity="false"
- comment="Customer Id"/>
- <column xsi:type="varchar" name="session_id" nullable="true" length="64" comment="Session ID"/>
- <column xsi:type="timestamp" name="last_visit_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
- comment="Last Visit Time"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="visitor_id"/>
- </constraint>
- <index referenceId="CUSTOMER_VISITOR_CUSTOMER_ID" indexType="btree">
- <column name="customer_id"/>
- </index>
- <index referenceId="CUSTOMER_VISITOR_LAST_VISIT_AT" indexType="btree">
- <column name="last_visit_at"/>
- </index>
- </table>
- <table name="customer_log" resource="default" engine="innodb" comment="Customer Log Table">
- <column xsi:type="int" name="log_id" padding="11" unsigned="false" nullable="false" identity="true"
- comment="Log ID"/>
- <column xsi:type="int" name="customer_id" padding="11" unsigned="false" nullable="false" identity="false"
- comment="Customer ID"/>
- <column xsi:type="timestamp" name="last_login_at" on_update="false" nullable="true" comment="Last Login Time"/>
- <column xsi:type="timestamp" name="last_logout_at" on_update="false" nullable="true"
- comment="Last Logout Time"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="log_id"/>
- </constraint>
- <constraint xsi:type="unique" referenceId="CUSTOMER_LOG_CUSTOMER_ID">
- <column name="customer_id"/>
- </constraint>
- </table>
- </schema>
|