db_schema.xml 1.9 KB

123456789101112131415161718192021222324252627282930313233
  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="translation" resource="default" engine="innodb" comment="Translations">
  11. <column xsi:type="int" name="key_id" padding="10" unsigned="true" nullable="false" identity="true"
  12. comment="Key Id of Translation"/>
  13. <column xsi:type="varchar" name="string" nullable="false" length="255" default="Translate String"
  14. comment="Translation String"/>
  15. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  16. default="0" comment="Store Id"/>
  17. <column xsi:type="varchar" name="translate" nullable="true" length="255" comment="Translate"/>
  18. <column xsi:type="varchar" name="locale" nullable="false" length="20" default="en_US" comment="Locale"/>
  19. <column xsi:type="bigint" name="crc_string" padding="20" unsigned="false" nullable="false" identity="false"
  20. default="1591228201" comment="Translation String CRC32 Hash"/>
  21. <constraint xsi:type="primary" referenceId="PRIMARY">
  22. <column name="key_id"/>
  23. </constraint>
  24. <constraint xsi:type="foreign" referenceId="TRANSLATION_STORE_ID_STORE_STORE_ID" table="translation" column="store_id"
  25. referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
  26. <constraint xsi:type="unique" referenceId="TRANSLATION_STORE_ID_LOCALE_CRC_STRING_STRING">
  27. <column name="store_id"/>
  28. <column name="locale"/>
  29. <column name="crc_string"/>
  30. <column name="string"/>
  31. </constraint>
  32. </table>
  33. </schema>