db_schema.xml 2.5 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="email_template" resource="default" engine="innodb" comment="Email Templates">
  11. <column xsi:type="int" name="template_id" padding="10" unsigned="true" nullable="false" identity="true"
  12. comment="Template ID"/>
  13. <column xsi:type="varchar" name="template_code" nullable="false" length="150" comment="Template Name"/>
  14. <column xsi:type="text" name="template_text" nullable="false" comment="Template Content"/>
  15. <column xsi:type="text" name="template_styles" nullable="true" comment="Templste Styles"/>
  16. <column xsi:type="int" name="template_type" padding="10" unsigned="true" nullable="true" identity="false"
  17. comment="Template Type"/>
  18. <column xsi:type="varchar" name="template_subject" nullable="false" length="200" comment="Template Subject"/>
  19. <column xsi:type="varchar" name="template_sender_name" nullable="true" length="200"
  20. comment="Template Sender Name"/>
  21. <column xsi:type="varchar" name="template_sender_email" nullable="true" length="200"
  22. comment="Template Sender Email"/>
  23. <column xsi:type="timestamp" name="added_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  24. comment="Date of Template Creation"/>
  25. <column xsi:type="timestamp" name="modified_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
  26. comment="Date of Template Modification"/>
  27. <column xsi:type="varchar" name="orig_template_code" nullable="true" length="200"
  28. comment="Original Template Code"/>
  29. <column xsi:type="text" name="orig_template_variables" nullable="true" comment="Original Template Variables"/>
  30. <constraint xsi:type="primary" referenceId="PRIMARY">
  31. <column name="template_id"/>
  32. </constraint>
  33. <constraint xsi:type="unique" referenceId="EMAIL_TEMPLATE_TEMPLATE_CODE">
  34. <column name="template_code"/>
  35. </constraint>
  36. <index referenceId="EMAIL_TEMPLATE_ADDED_AT" indexType="btree">
  37. <column name="added_at"/>
  38. </index>
  39. <index referenceId="EMAIL_TEMPLATE_MODIFIED_AT" indexType="btree">
  40. <column name="modified_at"/>
  41. </index>
  42. </table>
  43. </schema>