db_schema.xml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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="cms_block" resource="default" engine="innodb" comment="CMS Block Table">
  11. <column xsi:type="smallint" name="block_id" padding="6" unsigned="false" nullable="false" identity="true"
  12. comment="Entity ID"/>
  13. <column xsi:type="varchar" name="title" nullable="false" length="255" comment="Block Title"/>
  14. <column xsi:type="varchar" name="identifier" nullable="false" length="255" comment="Block String Identifier"/>
  15. <column xsi:type="mediumtext" name="content" nullable="true" comment="Block Content"/>
  16. <column xsi:type="timestamp" name="creation_time" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  17. comment="Block Creation Time"/>
  18. <column xsi:type="timestamp" name="update_time" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
  19. comment="Block Modification Time"/>
  20. <column xsi:type="smallint" name="is_active" padding="6" unsigned="false" nullable="false" identity="false"
  21. default="1" comment="Is Block Active"/>
  22. <constraint xsi:type="primary" referenceId="PRIMARY">
  23. <column name="block_id"/>
  24. </constraint>
  25. <index referenceId="CMS_BLOCK_TITLE_IDENTIFIER_CONTENT" indexType="fulltext">
  26. <column name="title"/>
  27. <column name="identifier"/>
  28. <column name="content"/>
  29. </index>
  30. </table>
  31. <table name="cms_block_store" resource="default" engine="innodb" comment="CMS Block To Store Linkage Table">
  32. <column xsi:type="smallint" name="block_id" padding="6" unsigned="false" nullable="false" identity="false"/>
  33. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  34. comment="Store ID"/>
  35. <constraint xsi:type="primary" referenceId="PRIMARY">
  36. <column name="block_id"/>
  37. <column name="store_id"/>
  38. </constraint>
  39. <constraint xsi:type="foreign" referenceId="CMS_BLOCK_STORE_BLOCK_ID_CMS_BLOCK_BLOCK_ID" table="cms_block_store"
  40. column="block_id" referenceTable="cms_block" referenceColumn="block_id" onDelete="CASCADE"/>
  41. <constraint xsi:type="foreign" referenceId="CMS_BLOCK_STORE_STORE_ID_STORE_STORE_ID" table="cms_block_store"
  42. column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
  43. <index referenceId="CMS_BLOCK_STORE_STORE_ID" indexType="btree">
  44. <column name="store_id"/>
  45. </index>
  46. </table>
  47. <table name="cms_page" resource="default" engine="innodb" comment="CMS Page Table">
  48. <column xsi:type="smallint" name="page_id" padding="6" unsigned="false" nullable="false" identity="true"
  49. comment="Entity ID"/>
  50. <column xsi:type="varchar" name="title" nullable="true" length="255" comment="Page Title"/>
  51. <column xsi:type="varchar" name="page_layout" nullable="true" length="255" comment="Page Layout"/>
  52. <column xsi:type="text" name="meta_keywords" nullable="true" comment="Page Meta Keywords"/>
  53. <column xsi:type="text" name="meta_description" nullable="true" comment="Page Meta Description"/>
  54. <column xsi:type="varchar" name="identifier" nullable="true" length="100" comment="Page String Identifier"/>
  55. <column xsi:type="varchar" name="content_heading" nullable="true" length="255" comment="Page Content Heading"/>
  56. <column xsi:type="mediumtext" name="content" nullable="true" comment="Page Content"/>
  57. <column xsi:type="timestamp" name="creation_time" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  58. comment="Page Creation Time"/>
  59. <column xsi:type="timestamp" name="update_time" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
  60. comment="Page Modification Time"/>
  61. <column xsi:type="smallint" name="is_active" padding="6" unsigned="false" nullable="false" identity="false"
  62. default="1" comment="Is Page Active"/>
  63. <column xsi:type="smallint" name="sort_order" padding="6" unsigned="false" nullable="false" identity="false"
  64. default="0" comment="Page Sort Order"/>
  65. <column xsi:type="text" name="layout_update_xml" nullable="true" comment="Page Layout Update Content"/>
  66. <column xsi:type="varchar" name="custom_theme" nullable="true" length="100" comment="Page Custom Theme"/>
  67. <column xsi:type="varchar" name="custom_root_template" nullable="true" length="255"
  68. comment="Page Custom Template"/>
  69. <column xsi:type="text" name="custom_layout_update_xml" nullable="true"
  70. comment="Page Custom Layout Update Content"/>
  71. <column xsi:type="date" name="custom_theme_from" comment="Page Custom Theme Active From Date"/>
  72. <column xsi:type="date" name="custom_theme_to" comment="Page Custom Theme Active To Date"/>
  73. <column xsi:type="varchar" name="meta_title" nullable="true" length="255" comment="Page Meta Title"/>
  74. <constraint xsi:type="primary" referenceId="PRIMARY">
  75. <column name="page_id"/>
  76. </constraint>
  77. <index referenceId="CMS_PAGE_IDENTIFIER" indexType="btree">
  78. <column name="identifier"/>
  79. </index>
  80. <index referenceId="CMS_PAGE_TITLE_META_KEYWORDS_META_DESCRIPTION_IDENTIFIER_CONTENT" indexType="fulltext">
  81. <column name="title"/>
  82. <column name="meta_keywords"/>
  83. <column name="meta_description"/>
  84. <column name="identifier"/>
  85. <column name="content"/>
  86. </index>
  87. </table>
  88. <table name="cms_page_store" resource="default" engine="innodb" comment="CMS Page To Store Linkage Table">
  89. <column xsi:type="smallint" name="page_id" padding="6" unsigned="false" nullable="false" identity="false"
  90. comment="Entity ID"/>
  91. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  92. comment="Store ID"/>
  93. <constraint xsi:type="primary" referenceId="PRIMARY">
  94. <column name="page_id"/>
  95. <column name="store_id"/>
  96. </constraint>
  97. <constraint xsi:type="foreign" referenceId="CMS_PAGE_STORE_PAGE_ID_CMS_PAGE_PAGE_ID" table="cms_page_store"
  98. column="page_id" referenceTable="cms_page" referenceColumn="page_id" onDelete="CASCADE"/>
  99. <constraint xsi:type="foreign" referenceId="CMS_PAGE_STORE_STORE_ID_STORE_STORE_ID" table="cms_page_store"
  100. column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
  101. <index referenceId="CMS_PAGE_STORE_STORE_ID" indexType="btree">
  102. <column name="store_id"/>
  103. </index>
  104. </table>
  105. </schema>