db_schema.xml 5.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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="catalog_product_super_attribute" resource="default" engine="innodb"
  11. comment="Catalog Product Super Attribute Table">
  12. <column xsi:type="int" name="product_super_attribute_id" padding="10" unsigned="true" nullable="false"
  13. identity="true" comment="Product Super Attribute ID"/>
  14. <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
  15. default="0" comment="Product ID"/>
  16. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  17. default="0" comment="Attribute ID"/>
  18. <column xsi:type="smallint" name="position" padding="5" unsigned="true" nullable="false" identity="false"
  19. default="0" comment="Position"/>
  20. <constraint xsi:type="primary" referenceId="PRIMARY">
  21. <column name="product_super_attribute_id"/>
  22. </constraint>
  23. <constraint xsi:type="foreign" referenceId="CAT_PRD_SPR_ATTR_PRD_ID_CAT_PRD_ENTT_ENTT_ID"
  24. table="catalog_product_super_attribute" column="product_id" referenceTable="catalog_product_entity"
  25. referenceColumn="entity_id" onDelete="CASCADE"/>
  26. <constraint xsi:type="unique" referenceId="CATALOG_PRODUCT_SUPER_ATTRIBUTE_PRODUCT_ID_ATTRIBUTE_ID">
  27. <column name="product_id"/>
  28. <column name="attribute_id"/>
  29. </constraint>
  30. </table>
  31. <table name="catalog_product_super_attribute_label" resource="default" engine="innodb"
  32. comment="Catalog Product Super Attribute Label Table">
  33. <column xsi:type="int" name="value_id" padding="10" unsigned="true" nullable="false" identity="true"
  34. comment="Value ID"/>
  35. <column xsi:type="int" name="product_super_attribute_id" padding="10" unsigned="true" nullable="false"
  36. identity="false" default="0" comment="Product Super Attribute ID"/>
  37. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  38. default="0" comment="Store ID"/>
  39. <column xsi:type="smallint" name="use_default" padding="5" unsigned="true" nullable="true" identity="false"
  40. default="0" comment="Use Default Value"/>
  41. <column xsi:type="varchar" name="value" nullable="true" length="255" comment="Value"/>
  42. <constraint xsi:type="primary" referenceId="PRIMARY">
  43. <column name="value_id"/>
  44. </constraint>
  45. <constraint xsi:type="foreign" referenceId="FK_309442281DF7784210ED82B2CC51E5D5"
  46. table="catalog_product_super_attribute_label" column="product_super_attribute_id"
  47. referenceTable="catalog_product_super_attribute" referenceColumn="product_super_attribute_id"
  48. onDelete="CASCADE"/>
  49. <constraint xsi:type="foreign" referenceId="CATALOG_PRODUCT_SUPER_ATTRIBUTE_LABEL_STORE_ID_STORE_STORE_ID"
  50. table="catalog_product_super_attribute_label" column="store_id" referenceTable="store"
  51. referenceColumn="store_id" onDelete="CASCADE"/>
  52. <constraint xsi:type="unique" referenceId="CAT_PRD_SPR_ATTR_LBL_PRD_SPR_ATTR_ID_STORE_ID">
  53. <column name="product_super_attribute_id"/>
  54. <column name="store_id"/>
  55. </constraint>
  56. <index referenceId="CATALOG_PRODUCT_SUPER_ATTRIBUTE_LABEL_STORE_ID" indexType="btree">
  57. <column name="store_id"/>
  58. </index>
  59. </table>
  60. <table name="catalog_product_super_link" resource="default" engine="innodb"
  61. comment="Catalog Product Super Link Table">
  62. <column xsi:type="int" name="link_id" padding="10" unsigned="true" nullable="false" identity="true"
  63. comment="Link ID"/>
  64. <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
  65. default="0" comment="Product ID"/>
  66. <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
  67. default="0" comment="Parent ID"/>
  68. <constraint xsi:type="primary" referenceId="PRIMARY">
  69. <column name="link_id"/>
  70. </constraint>
  71. <constraint xsi:type="foreign" referenceId="CAT_PRD_SPR_LNK_PRD_ID_CAT_PRD_ENTT_ENTT_ID"
  72. table="catalog_product_super_link" column="product_id" referenceTable="catalog_product_entity"
  73. referenceColumn="entity_id" onDelete="CASCADE"/>
  74. <constraint xsi:type="foreign" referenceId="CAT_PRD_SPR_LNK_PARENT_ID_CAT_PRD_ENTT_ENTT_ID"
  75. table="catalog_product_super_link" column="parent_id" referenceTable="catalog_product_entity"
  76. referenceColumn="entity_id" onDelete="CASCADE"/>
  77. <constraint xsi:type="unique" referenceId="CATALOG_PRODUCT_SUPER_LINK_PRODUCT_ID_PARENT_ID">
  78. <column name="product_id"/>
  79. <column name="parent_id"/>
  80. </constraint>
  81. <index referenceId="CATALOG_PRODUCT_SUPER_LINK_PARENT_ID" indexType="btree">
  82. <column name="parent_id"/>
  83. </index>
  84. </table>
  85. </schema>