db_schema.xml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  9. xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
  10. <table name="checkout_agreement" resource="default" engine="innodb" comment="Checkout Agreement">
  11. <column xsi:type="int" name="agreement_id" padding="10" unsigned="true" nullable="false" identity="true"
  12. comment="Agreement Id"/>
  13. <column xsi:type="varchar" name="name" nullable="true" length="255" comment="Name"/>
  14. <column xsi:type="text" name="content" nullable="true" comment="Content"/>
  15. <column xsi:type="varchar" name="content_height" nullable="true" length="25" comment="Content Height"/>
  16. <column xsi:type="text" name="checkbox_text" nullable="true" comment="Checkbox Text"/>
  17. <column xsi:type="smallint" name="is_active" padding="6" unsigned="false" nullable="false" identity="false"
  18. default="0" comment="Is Active"/>
  19. <column xsi:type="smallint" name="is_html" padding="6" unsigned="false" nullable="false" identity="false"
  20. default="0" comment="Is Html"/>
  21. <column xsi:type="smallint" name="mode" padding="6" unsigned="false" nullable="false" identity="false"
  22. default="0" comment="Applied mode"/>
  23. <constraint xsi:type="primary" referenceId="PRIMARY">
  24. <column name="agreement_id"/>
  25. </constraint>
  26. </table>
  27. <table name="checkout_agreement_store" resource="default" engine="innodb" comment="Checkout Agreement Store">
  28. <column xsi:type="int" name="agreement_id" padding="10" unsigned="true" nullable="false" identity="false"
  29. comment="Agreement Id"/>
  30. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  31. comment="Store Id"/>
  32. <constraint xsi:type="primary" referenceId="PRIMARY">
  33. <column name="agreement_id"/>
  34. <column name="store_id"/>
  35. </constraint>
  36. <constraint xsi:type="foreign" referenceId="CHKT_AGRT_STORE_AGRT_ID_CHKT_AGRT_AGRT_ID" table="checkout_agreement_store"
  37. column="agreement_id" referenceTable="checkout_agreement" referenceColumn="agreement_id"
  38. onDelete="CASCADE"/>
  39. <constraint xsi:type="foreign" referenceId="CHECKOUT_AGREEMENT_STORE_STORE_ID_STORE_STORE_ID"
  40. table="checkout_agreement_store" column="store_id" referenceTable="store" referenceColumn="store_id"
  41. onDelete="CASCADE"/>
  42. </table>
  43. </schema>