db_schema.xml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  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_bundle_option" resource="default" engine="innodb"
  11. comment="Catalog Product Bundle Option">
  12. <column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="true"
  13. comment="Option Id"/>
  14. <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
  15. comment="Parent Id"/>
  16. <column xsi:type="smallint" name="required" padding="5" unsigned="true" nullable="false" identity="false"
  17. default="0" comment="Required"/>
  18. <column xsi:type="int" name="position" padding="10" unsigned="true" nullable="false" identity="false"
  19. default="0" comment="Position"/>
  20. <column xsi:type="varchar" name="type" nullable="true" length="255" comment="Type"/>
  21. <constraint xsi:type="primary" referenceId="PRIMARY">
  22. <column name="option_id"/>
  23. </constraint>
  24. <constraint xsi:type="foreign" referenceId="CAT_PRD_BNDL_OPT_PARENT_ID_CAT_PRD_ENTT_ENTT_ID"
  25. table="catalog_product_bundle_option" column="parent_id" referenceTable="catalog_product_entity"
  26. referenceColumn="entity_id" onDelete="CASCADE"/>
  27. <index referenceId="CATALOG_PRODUCT_BUNDLE_OPTION_PARENT_ID" indexType="btree">
  28. <column name="parent_id"/>
  29. </index>
  30. </table>
  31. <table name="catalog_product_bundle_option_value" resource="default" engine="innodb"
  32. comment="Catalog Product Bundle Option Value">
  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="option_id" padding="10" unsigned="true" nullable="false" identity="false"
  36. comment="Option Id"/>
  37. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  38. comment="Store Id"/>
  39. <column xsi:type="varchar" name="title" nullable="true" length="255" comment="Title"/>
  40. <column xsi:type="int" name="parent_product_id" padding="10" unsigned="true" nullable="false" identity="false"
  41. comment="Parent Product Id"/>
  42. <constraint xsi:type="primary" referenceId="PRIMARY">
  43. <column name="value_id"/>
  44. </constraint>
  45. <constraint xsi:type="foreign" referenceId="CAT_PRD_BNDL_OPT_VAL_OPT_ID_CAT_PRD_BNDL_OPT_OPT_ID"
  46. table="catalog_product_bundle_option_value" column="option_id"
  47. referenceTable="catalog_product_bundle_option" referenceColumn="option_id" onDelete="CASCADE"/>
  48. <constraint xsi:type="unique" referenceId="CAT_PRD_BNDL_OPT_VAL_OPT_ID_PARENT_PRD_ID_STORE_ID">
  49. <column name="option_id"/>
  50. <column name="parent_product_id"/>
  51. <column name="store_id"/>
  52. </constraint>
  53. </table>
  54. <table name="catalog_product_bundle_selection" resource="default" engine="innodb"
  55. comment="Catalog Product Bundle Selection">
  56. <column xsi:type="int" name="selection_id" padding="10" unsigned="true" nullable="false" identity="true"
  57. comment="Selection Id"/>
  58. <column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="false"
  59. comment="Option Id"/>
  60. <column xsi:type="int" name="parent_product_id" padding="10" unsigned="true" nullable="false" identity="false"
  61. comment="Parent Product Id"/>
  62. <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
  63. comment="Product Id"/>
  64. <column xsi:type="int" name="position" padding="10" unsigned="true" nullable="false" identity="false"
  65. default="0" comment="Position"/>
  66. <column xsi:type="smallint" name="is_default" padding="5" unsigned="true" nullable="false" identity="false"
  67. default="0" comment="Is Default"/>
  68. <column xsi:type="smallint" name="selection_price_type" padding="5" unsigned="true" nullable="false"
  69. identity="false" default="0" comment="Selection Price Type"/>
  70. <column xsi:type="decimal" name="selection_price_value" scale="4" precision="12" unsigned="false"
  71. nullable="false" default="0" comment="Selection Price Value"/>
  72. <column xsi:type="decimal" name="selection_qty" scale="4" precision="12" unsigned="false" nullable="true"
  73. comment="Selection Qty"/>
  74. <column xsi:type="smallint" name="selection_can_change_qty" padding="6" unsigned="false" nullable="false"
  75. identity="false" default="0" comment="Selection Can Change Qty"/>
  76. <constraint xsi:type="primary" referenceId="PRIMARY">
  77. <column name="selection_id"/>
  78. </constraint>
  79. <constraint xsi:type="foreign" referenceId="CAT_PRD_BNDL_SELECTION_OPT_ID_CAT_PRD_BNDL_OPT_OPT_ID"
  80. table="catalog_product_bundle_selection" column="option_id"
  81. referenceTable="catalog_product_bundle_option" referenceColumn="option_id" onDelete="CASCADE"/>
  82. <constraint xsi:type="foreign" referenceId="CAT_PRD_BNDL_SELECTION_PRD_ID_CAT_PRD_ENTT_ENTT_ID"
  83. table="catalog_product_bundle_selection" column="product_id" referenceTable="catalog_product_entity"
  84. referenceColumn="entity_id" onDelete="CASCADE"/>
  85. <index referenceId="CATALOG_PRODUCT_BUNDLE_SELECTION_OPTION_ID" indexType="btree">
  86. <column name="option_id"/>
  87. </index>
  88. <index referenceId="CATALOG_PRODUCT_BUNDLE_SELECTION_PRODUCT_ID" indexType="btree">
  89. <column name="product_id"/>
  90. </index>
  91. </table>
  92. <table name="catalog_product_bundle_selection_price" resource="default" engine="innodb"
  93. comment="Catalog Product Bundle Selection Price">
  94. <column xsi:type="int" name="selection_id" padding="10" unsigned="true" nullable="false" identity="false"
  95. comment="Selection Id"/>
  96. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  97. comment="Website Id"/>
  98. <column xsi:type="smallint" name="selection_price_type" padding="5" unsigned="true" nullable="false"
  99. identity="false" default="0" comment="Selection Price Type"/>
  100. <column xsi:type="decimal" name="selection_price_value" scale="4" precision="12" unsigned="false"
  101. nullable="false" default="0" comment="Selection Price Value"/>
  102. <column xsi:type="int" name="parent_product_id" padding="10" unsigned="true" nullable="false" identity="false"
  103. comment="Parent Product Id"/>
  104. <constraint xsi:type="primary" referenceId="PK_CATALOG_PRODUCT_BUNDLE_SELECTION_PRICE">
  105. <column name="selection_id"/>
  106. <column name="parent_product_id"/>
  107. <column name="website_id"/>
  108. </constraint>
  109. <constraint xsi:type="foreign" referenceId="CAT_PRD_BNDL_SELECTION_PRICE_WS_ID_STORE_WS_WS_ID"
  110. table="catalog_product_bundle_selection_price" column="website_id" referenceTable="store_website"
  111. referenceColumn="website_id" onDelete="CASCADE"/>
  112. <constraint xsi:type="foreign" referenceId="FK_DCF37523AA05D770A70AA4ED7C2616E4"
  113. table="catalog_product_bundle_selection_price" column="selection_id"
  114. referenceTable="catalog_product_bundle_selection" referenceColumn="selection_id"
  115. onDelete="CASCADE"/>
  116. <index referenceId="CATALOG_PRODUCT_BUNDLE_SELECTION_PRICE_WEBSITE_ID" indexType="btree">
  117. <column name="website_id"/>
  118. </index>
  119. </table>
  120. <table name="catalog_product_bundle_price_index" resource="default" engine="innodb"
  121. comment="Catalog Product Bundle Price Index">
  122. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  123. comment="Entity ID"/>
  124. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  125. comment="Website Id"/>
  126. <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false"
  127. comment="Customer Group ID"/>
  128. <column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="false"
  129. comment="Min Price"/>
  130. <column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="false"
  131. comment="Max Price"/>
  132. <constraint xsi:type="primary" referenceId="PRIMARY">
  133. <column name="entity_id"/>
  134. <column name="website_id"/>
  135. <column name="customer_group_id"/>
  136. </constraint>
  137. <constraint xsi:type="foreign" referenceId="CAT_PRD_BNDL_PRICE_IDX_CSTR_GROUP_ID_CSTR_GROUP_CSTR_GROUP_ID"
  138. table="catalog_product_bundle_price_index" column="customer_group_id"
  139. referenceTable="customer_group" referenceColumn="customer_group_id" onDelete="CASCADE"/>
  140. <constraint xsi:type="foreign" referenceId="CAT_PRD_BNDL_PRICE_IDX_ENTT_ID_CAT_PRD_ENTT_ENTT_ID"
  141. table="catalog_product_bundle_price_index" column="entity_id"
  142. referenceTable="catalog_product_entity" referenceColumn="entity_id" onDelete="CASCADE"/>
  143. <constraint xsi:type="foreign" referenceId="CAT_PRD_BNDL_PRICE_IDX_WS_ID_STORE_WS_WS_ID"
  144. table="catalog_product_bundle_price_index" column="website_id" referenceTable="store_website"
  145. referenceColumn="website_id" onDelete="CASCADE"/>
  146. <index referenceId="CATALOG_PRODUCT_BUNDLE_PRICE_INDEX_WEBSITE_ID" indexType="btree">
  147. <column name="website_id"/>
  148. </index>
  149. <index referenceId="CATALOG_PRODUCT_BUNDLE_PRICE_INDEX_CUSTOMER_GROUP_ID" indexType="btree">
  150. <column name="customer_group_id"/>
  151. </index>
  152. </table>
  153. <table name="catalog_product_bundle_stock_index" resource="default" engine="innodb"
  154. comment="Catalog Product Bundle Stock Index">
  155. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  156. comment="Entity ID"/>
  157. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  158. comment="Website ID"/>
  159. <column xsi:type="smallint" name="stock_id" padding="5" unsigned="true" nullable="false" identity="false"
  160. comment="Stock ID"/>
  161. <column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="false"
  162. default="0" comment="Option Id"/>
  163. <column xsi:type="smallint" name="stock_status" padding="6" unsigned="false" nullable="true" identity="false"
  164. default="0" comment="Stock Status"/>
  165. <constraint xsi:type="primary" referenceId="PRIMARY">
  166. <column name="entity_id"/>
  167. <column name="website_id"/>
  168. <column name="stock_id"/>
  169. <column name="option_id"/>
  170. </constraint>
  171. </table>
  172. <table name="catalog_product_index_price_bundle_idx" resource="default" engine="innodb"
  173. comment="Catalog Product Index Price Bundle Idx">
  174. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  175. comment="Entity ID"/>
  176. <column xsi:type="int" name="customer_group_id" padding="11" unsigned="false" nullable="false"
  177. identity="false"/>
  178. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  179. comment="Website ID"/>
  180. <column xsi:type="smallint" name="tax_class_id" padding="5" unsigned="true" nullable="true" identity="false"
  181. default="0" comment="Tax Class ID"/>
  182. <column xsi:type="smallint" name="price_type" padding="5" unsigned="true" nullable="false" identity="false"
  183. comment="Price Type"/>
  184. <column xsi:type="decimal" name="special_price" scale="4" precision="12" unsigned="false" nullable="true"
  185. comment="Special Price"/>
  186. <column xsi:type="decimal" name="tier_percent" scale="4" precision="12" unsigned="false" nullable="true"
  187. comment="Tier Percent"/>
  188. <column xsi:type="decimal" name="orig_price" scale="4" precision="12" unsigned="false" nullable="true"
  189. comment="Orig Price"/>
  190. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
  191. comment="Price"/>
  192. <column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
  193. comment="Min Price"/>
  194. <column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
  195. comment="Max Price"/>
  196. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  197. comment="Tier Price"/>
  198. <column xsi:type="decimal" name="base_tier" scale="4" precision="12" unsigned="false" nullable="true"
  199. comment="Base Tier"/>
  200. <constraint xsi:type="primary" referenceId="PRIMARY">
  201. <column name="entity_id"/>
  202. <column name="customer_group_id"/>
  203. <column name="website_id"/>
  204. </constraint>
  205. </table>
  206. <table name="catalog_product_index_price_bundle_tmp" resource="default" engine="memory"
  207. comment="Catalog Product Index Price Bundle Tmp">
  208. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  209. comment="Entity ID"/>
  210. <column xsi:type="int" name="customer_group_id" padding="11" unsigned="false" nullable="false"
  211. identity="false"/>
  212. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  213. comment="Website ID"/>
  214. <column xsi:type="smallint" name="tax_class_id" padding="5" unsigned="true" nullable="true" identity="false"
  215. default="0" comment="Tax Class ID"/>
  216. <column xsi:type="smallint" name="price_type" padding="5" unsigned="true" nullable="false" identity="false"
  217. comment="Price Type"/>
  218. <column xsi:type="decimal" name="special_price" scale="4" precision="12" unsigned="false" nullable="true"
  219. comment="Special Price"/>
  220. <column xsi:type="decimal" name="tier_percent" scale="4" precision="12" unsigned="false" nullable="true"
  221. comment="Tier Percent"/>
  222. <column xsi:type="decimal" name="orig_price" scale="4" precision="12" unsigned="false" nullable="true"
  223. comment="Orig Price"/>
  224. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
  225. comment="Price"/>
  226. <column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
  227. comment="Min Price"/>
  228. <column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
  229. comment="Max Price"/>
  230. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  231. comment="Tier Price"/>
  232. <column xsi:type="decimal" name="base_tier" scale="4" precision="12" unsigned="false" nullable="true"
  233. comment="Base Tier"/>
  234. <constraint xsi:type="primary" referenceId="PRIMARY">
  235. <column name="entity_id"/>
  236. <column name="customer_group_id"/>
  237. <column name="website_id"/>
  238. </constraint>
  239. </table>
  240. <table name="catalog_product_index_price_bundle_sel_idx" resource="default" engine="innodb"
  241. comment="Catalog Product Index Price Bundle Sel Idx">
  242. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  243. comment="Entity ID"/>
  244. <column xsi:type="int" name="customer_group_id" padding="11" unsigned="false" nullable="false"
  245. identity="false"/>
  246. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  247. comment="Website ID"/>
  248. <column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="false"
  249. default="0" comment="Option Id"/>
  250. <column xsi:type="int" name="selection_id" padding="10" unsigned="true" nullable="false" identity="false"
  251. default="0" comment="Selection Id"/>
  252. <column xsi:type="smallint" name="group_type" padding="5" unsigned="true" nullable="true" identity="false"
  253. default="0" comment="Group Type"/>
  254. <column xsi:type="smallint" name="is_required" padding="5" unsigned="true" nullable="true" identity="false"
  255. default="0" comment="Is Required"/>
  256. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
  257. comment="Price"/>
  258. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  259. comment="Tier Price"/>
  260. <constraint xsi:type="primary" referenceId="PRIMARY">
  261. <column name="entity_id"/>
  262. <column name="customer_group_id"/>
  263. <column name="website_id"/>
  264. <column name="option_id"/>
  265. <column name="selection_id"/>
  266. </constraint>
  267. </table>
  268. <table name="catalog_product_index_price_bundle_sel_tmp" resource="default" engine="memory"
  269. comment="Catalog Product Index Price Bundle Sel Tmp">
  270. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  271. comment="Entity ID"/>
  272. <column xsi:type="int" name="customer_group_id" padding="11" unsigned="false" nullable="false"
  273. identity="false"/>
  274. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  275. comment="Website ID"/>
  276. <column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="false"
  277. default="0" comment="Option Id"/>
  278. <column xsi:type="int" name="selection_id" padding="10" unsigned="true" nullable="false" identity="false"
  279. default="0" comment="Selection Id"/>
  280. <column xsi:type="smallint" name="group_type" padding="5" unsigned="true" nullable="true" identity="false"
  281. default="0" comment="Group Type"/>
  282. <column xsi:type="smallint" name="is_required" padding="5" unsigned="true" nullable="true" identity="false"
  283. default="0" comment="Is Required"/>
  284. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
  285. comment="Price"/>
  286. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  287. comment="Tier Price"/>
  288. <constraint xsi:type="primary" referenceId="PRIMARY">
  289. <column name="entity_id"/>
  290. <column name="customer_group_id"/>
  291. <column name="website_id"/>
  292. <column name="option_id"/>
  293. <column name="selection_id"/>
  294. </constraint>
  295. </table>
  296. <table name="catalog_product_index_price_bundle_opt_idx" resource="default" engine="innodb"
  297. comment="Catalog Product Index Price Bundle Opt Idx">
  298. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  299. comment="Entity ID"/>
  300. <column xsi:type="int" name="customer_group_id" padding="11" unsigned="false" nullable="false"
  301. identity="false"/>
  302. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  303. comment="Website ID"/>
  304. <column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="false"
  305. default="0" comment="Option Id"/>
  306. <column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
  307. comment="Min Price"/>
  308. <column xsi:type="decimal" name="alt_price" scale="4" precision="12" unsigned="false" nullable="true"
  309. comment="Alt Price"/>
  310. <column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
  311. comment="Max Price"/>
  312. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  313. comment="Tier Price"/>
  314. <column xsi:type="decimal" name="alt_tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  315. comment="Alt Tier Price"/>
  316. <constraint xsi:type="primary" referenceId="PRIMARY">
  317. <column name="entity_id"/>
  318. <column name="customer_group_id"/>
  319. <column name="website_id"/>
  320. <column name="option_id"/>
  321. </constraint>
  322. </table>
  323. <table name="catalog_product_index_price_bundle_opt_tmp" resource="default" engine="memory"
  324. comment="Catalog Product Index Price Bundle Opt Tmp">
  325. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  326. comment="Entity ID"/>
  327. <column xsi:type="int" name="customer_group_id" padding="11" unsigned="false" nullable="false"
  328. identity="false"/>
  329. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  330. comment="Website ID"/>
  331. <column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="false"
  332. default="0" comment="Option Id"/>
  333. <column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
  334. comment="Min Price"/>
  335. <column xsi:type="decimal" name="alt_price" scale="4" precision="12" unsigned="false" nullable="true"
  336. comment="Alt Price"/>
  337. <column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
  338. comment="Max Price"/>
  339. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  340. comment="Tier Price"/>
  341. <column xsi:type="decimal" name="alt_tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  342. comment="Alt Tier Price"/>
  343. <constraint xsi:type="primary" referenceId="PRIMARY">
  344. <column name="entity_id"/>
  345. <column name="customer_group_id"/>
  346. <column name="website_id"/>
  347. <column name="option_id"/>
  348. </constraint>
  349. </table>
  350. </schema>