1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?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="checkout_agreement" resource="default" engine="innodb" comment="Checkout Agreement">
<column xsi:type="int" name="agreement_id" padding="10" unsigned="true" nullable="false" identity="true"
comment="Agreement Id"/>
<column xsi:type="varchar" name="name" nullable="true" length="255" comment="Name"/>
<column xsi:type="text" name="content" nullable="true" comment="Content"/>
<column xsi:type="varchar" name="content_height" nullable="true" length="25" comment="Content Height"/>
<column xsi:type="text" name="checkbox_text" nullable="true" comment="Checkbox Text"/>
<column xsi:type="smallint" name="is_active" padding="6" unsigned="false" nullable="false" identity="false"
default="0" comment="Is Active"/>
<column xsi:type="smallint" name="is_html" padding="6" unsigned="false" nullable="false" identity="false"
default="0" comment="Is Html"/>
<column xsi:type="smallint" name="mode" padding="6" unsigned="false" nullable="false" identity="false"
default="0" comment="Applied mode"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="agreement_id"/>
</constraint>
</table>
<table name="checkout_agreement_store" resource="default" engine="innodb" comment="Checkout Agreement Store">
<column xsi:type="int" name="agreement_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Agreement Id"/>
<column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Store Id"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="agreement_id"/>
<column name="store_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="CHKT_AGRT_STORE_AGRT_ID_CHKT_AGRT_AGRT_ID" table="checkout_agreement_store"
column="agreement_id" referenceTable="checkout_agreement" referenceColumn="agreement_id"
onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="CHECKOUT_AGREEMENT_STORE_STORE_ID_STORE_STORE_ID"
table="checkout_agreement_store" column="store_id" referenceTable="store" referenceColumn="store_id"
onDelete="CASCADE"/>
</table>
</schema>