init
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0"?>
|
||||
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework/Setup/Declaration/Schema/etc/schema.xsd">
|
||||
<table name="esun_campaign_registration" resource="default" engine="innodb"
|
||||
comment="eSUN Campaign Registrations">
|
||||
<column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="true"
|
||||
comment="Entity ID"/>
|
||||
<column xsi:type="varchar" name="campaign_code" nullable="false" length="64"
|
||||
comment="Campaign Code"/>
|
||||
<column xsi:type="int" name="customer_id" unsigned="true" nullable="false"
|
||||
comment="Customer ID"/>
|
||||
<column xsi:type="varchar" name="email" nullable="false" length="255"
|
||||
comment="Registration Email (Normalized)"/>
|
||||
<column xsi:type="smallint" name="website_id" unsigned="true" nullable="false"
|
||||
comment="Website ID"/>
|
||||
<column xsi:type="smallint" name="store_id" unsigned="true" nullable="false"
|
||||
comment="Store ID"/>
|
||||
<column xsi:type="timestamp" name="registered_at" nullable="false" default="CURRENT_TIMESTAMP"
|
||||
on_update="false" comment="Registered At"/>
|
||||
|
||||
<constraint xsi:type="primary" referenceId="PRIMARY">
|
||||
<column name="entity_id"/>
|
||||
</constraint>
|
||||
<constraint xsi:type="unique" referenceId="ESUN_CAMPAIGN_REGISTRATION_CODE_CUSTOMER_UNQ">
|
||||
<column name="campaign_code"/>
|
||||
<column name="customer_id"/>
|
||||
</constraint>
|
||||
<constraint xsi:type="unique" referenceId="ESUN_CAMPAIGN_REGISTRATION_CODE_EMAIL_UNQ">
|
||||
<column name="campaign_code"/>
|
||||
<column name="email"/>
|
||||
</constraint>
|
||||
<index referenceId="ESUN_CAMPAIGN_REGISTRATION_REGISTERED_AT" indexType="btree">
|
||||
<column name="registered_at"/>
|
||||
</index>
|
||||
</table>
|
||||
</schema>
|
||||
Reference in New Issue
Block a user