db_schema.xml 119 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834
  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_entity" resource="default" engine="innodb" comment="Catalog Product Table">
  11. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
  12. comment="Entity ID"/>
  13. <column xsi:type="smallint" name="attribute_set_id" padding="5" unsigned="true" nullable="false"
  14. identity="false" default="0" comment="Attribute Set ID"/>
  15. <column xsi:type="varchar" name="type_id" nullable="false" length="32" default="simple" comment="Type ID"/>
  16. <column xsi:type="varchar" name="sku" nullable="true" length="64" comment="SKU"/>
  17. <column xsi:type="smallint" name="has_options" padding="6" unsigned="false" nullable="false" identity="false"
  18. default="0" comment="Has Options"/>
  19. <column xsi:type="smallint" name="required_options" padding="5" unsigned="true" nullable="false"
  20. identity="false" default="0" comment="Required Options"/>
  21. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  22. comment="Creation Time"/>
  23. <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
  24. comment="Update Time"/>
  25. <constraint xsi:type="primary" referenceId="PRIMARY">
  26. <column name="entity_id"/>
  27. </constraint>
  28. <index referenceId="CATALOG_PRODUCT_ENTITY_ATTRIBUTE_SET_ID" indexType="btree">
  29. <column name="attribute_set_id"/>
  30. </index>
  31. <index referenceId="CATALOG_PRODUCT_ENTITY_SKU" indexType="btree">
  32. <column name="sku"/>
  33. </index>
  34. </table>
  35. <table name="catalog_product_entity_datetime" resource="default" engine="innodb"
  36. comment="Catalog Product Datetime Attribute Backend Table">
  37. <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
  38. comment="Value ID"/>
  39. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  40. default="0" comment="Attribute ID"/>
  41. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  42. default="0" comment="Store ID"/>
  43. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  44. default="0" comment="Entity ID"/>
  45. <column xsi:type="datetime" name="value" on_update="false" nullable="true" comment="Value"/>
  46. <constraint xsi:type="primary" referenceId="PRIMARY">
  47. <column name="value_id"/>
  48. </constraint>
  49. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_DTIME_ATTR_ID_EAV_ATTR_ATTR_ID"
  50. table="catalog_product_entity_datetime" column="attribute_id" referenceTable="eav_attribute"
  51. referenceColumn="attribute_id" onDelete="CASCADE"/>
  52. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_DTIME_ENTT_ID_CAT_PRD_ENTT_ENTT_ID"
  53. table="catalog_product_entity_datetime" column="entity_id" referenceTable="catalog_product_entity"
  54. referenceColumn="entity_id" onDelete="CASCADE"/>
  55. <constraint xsi:type="foreign" referenceId="CATALOG_PRODUCT_ENTITY_DATETIME_STORE_ID_STORE_STORE_ID"
  56. table="catalog_product_entity_datetime" column="store_id" referenceTable="store"
  57. referenceColumn="store_id" onDelete="CASCADE"/>
  58. <constraint xsi:type="unique" referenceId="CATALOG_PRODUCT_ENTITY_DATETIME_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
  59. <column name="entity_id"/>
  60. <column name="attribute_id"/>
  61. <column name="store_id"/>
  62. </constraint>
  63. <index referenceId="CATALOG_PRODUCT_ENTITY_DATETIME_ATTRIBUTE_ID" indexType="btree">
  64. <column name="attribute_id"/>
  65. </index>
  66. <index referenceId="CATALOG_PRODUCT_ENTITY_DATETIME_STORE_ID" indexType="btree">
  67. <column name="store_id"/>
  68. </index>
  69. </table>
  70. <table name="catalog_product_entity_decimal" resource="default" engine="innodb"
  71. comment="Catalog Product Decimal Attribute Backend Table">
  72. <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
  73. comment="Value ID"/>
  74. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  75. default="0" comment="Attribute ID"/>
  76. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  77. default="0" comment="Store ID"/>
  78. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  79. default="0" comment="Entity ID"/>
  80. <column xsi:type="decimal" name="value" scale="4" precision="12" unsigned="false" nullable="true"
  81. comment="Value"/>
  82. <constraint xsi:type="primary" referenceId="PRIMARY">
  83. <column name="value_id"/>
  84. </constraint>
  85. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_DEC_ATTR_ID_EAV_ATTR_ATTR_ID"
  86. table="catalog_product_entity_decimal" column="attribute_id" referenceTable="eav_attribute"
  87. referenceColumn="attribute_id" onDelete="CASCADE"/>
  88. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_DEC_ENTT_ID_CAT_PRD_ENTT_ENTT_ID"
  89. table="catalog_product_entity_decimal" column="entity_id" referenceTable="catalog_product_entity"
  90. referenceColumn="entity_id" onDelete="CASCADE"/>
  91. <constraint xsi:type="foreign" referenceId="CATALOG_PRODUCT_ENTITY_DECIMAL_STORE_ID_STORE_STORE_ID"
  92. table="catalog_product_entity_decimal" column="store_id" referenceTable="store"
  93. referenceColumn="store_id" onDelete="CASCADE"/>
  94. <constraint xsi:type="unique" referenceId="CATALOG_PRODUCT_ENTITY_DECIMAL_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
  95. <column name="entity_id"/>
  96. <column name="attribute_id"/>
  97. <column name="store_id"/>
  98. </constraint>
  99. <index referenceId="CATALOG_PRODUCT_ENTITY_DECIMAL_STORE_ID" indexType="btree">
  100. <column name="store_id"/>
  101. </index>
  102. <index referenceId="CATALOG_PRODUCT_ENTITY_DECIMAL_ATTRIBUTE_ID" indexType="btree">
  103. <column name="attribute_id"/>
  104. </index>
  105. </table>
  106. <table name="catalog_product_entity_int" resource="default" engine="innodb"
  107. comment="Catalog Product Integer Attribute Backend Table">
  108. <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
  109. comment="Value ID"/>
  110. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  111. default="0" comment="Attribute ID"/>
  112. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  113. default="0" comment="Store ID"/>
  114. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  115. default="0" comment="Entity ID"/>
  116. <column xsi:type="int" name="value" padding="11" unsigned="false" nullable="true" identity="false"
  117. comment="Value"/>
  118. <constraint xsi:type="primary" referenceId="PRIMARY">
  119. <column name="value_id"/>
  120. </constraint>
  121. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_INT_ATTR_ID_EAV_ATTR_ATTR_ID"
  122. table="catalog_product_entity_int" column="attribute_id" referenceTable="eav_attribute"
  123. referenceColumn="attribute_id" onDelete="CASCADE"/>
  124. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_INT_ENTT_ID_CAT_PRD_ENTT_ENTT_ID"
  125. table="catalog_product_entity_int" column="entity_id" referenceTable="catalog_product_entity"
  126. referenceColumn="entity_id" onDelete="CASCADE"/>
  127. <constraint xsi:type="foreign" referenceId="CATALOG_PRODUCT_ENTITY_INT_STORE_ID_STORE_STORE_ID"
  128. table="catalog_product_entity_int" column="store_id" referenceTable="store"
  129. referenceColumn="store_id" onDelete="CASCADE"/>
  130. <constraint xsi:type="unique" referenceId="CATALOG_PRODUCT_ENTITY_INT_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
  131. <column name="entity_id"/>
  132. <column name="attribute_id"/>
  133. <column name="store_id"/>
  134. </constraint>
  135. <index referenceId="CATALOG_PRODUCT_ENTITY_INT_ATTRIBUTE_ID" indexType="btree">
  136. <column name="attribute_id"/>
  137. </index>
  138. <index referenceId="CATALOG_PRODUCT_ENTITY_INT_STORE_ID" indexType="btree">
  139. <column name="store_id"/>
  140. </index>
  141. </table>
  142. <table name="catalog_product_entity_text" resource="default" engine="innodb"
  143. comment="Catalog Product Text Attribute Backend Table">
  144. <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
  145. comment="Value ID"/>
  146. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  147. default="0" comment="Attribute ID"/>
  148. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  149. default="0" comment="Store ID"/>
  150. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  151. default="0" comment="Entity ID"/>
  152. <column xsi:type="text" name="value" nullable="true" comment="Value"/>
  153. <constraint xsi:type="primary" referenceId="PRIMARY">
  154. <column name="value_id"/>
  155. </constraint>
  156. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_TEXT_ATTR_ID_EAV_ATTR_ATTR_ID"
  157. table="catalog_product_entity_text" column="attribute_id" referenceTable="eav_attribute"
  158. referenceColumn="attribute_id" onDelete="CASCADE"/>
  159. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_TEXT_ENTT_ID_CAT_PRD_ENTT_ENTT_ID"
  160. table="catalog_product_entity_text" column="entity_id" referenceTable="catalog_product_entity"
  161. referenceColumn="entity_id" onDelete="CASCADE"/>
  162. <constraint xsi:type="foreign" referenceId="CATALOG_PRODUCT_ENTITY_TEXT_STORE_ID_STORE_STORE_ID"
  163. table="catalog_product_entity_text" column="store_id" referenceTable="store"
  164. referenceColumn="store_id" onDelete="CASCADE"/>
  165. <constraint xsi:type="unique" referenceId="CATALOG_PRODUCT_ENTITY_TEXT_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
  166. <column name="entity_id"/>
  167. <column name="attribute_id"/>
  168. <column name="store_id"/>
  169. </constraint>
  170. <index referenceId="CATALOG_PRODUCT_ENTITY_TEXT_ATTRIBUTE_ID" indexType="btree">
  171. <column name="attribute_id"/>
  172. </index>
  173. <index referenceId="CATALOG_PRODUCT_ENTITY_TEXT_STORE_ID" indexType="btree">
  174. <column name="store_id"/>
  175. </index>
  176. </table>
  177. <table name="catalog_product_entity_varchar" resource="default" engine="innodb"
  178. comment="Catalog Product Varchar Attribute Backend Table">
  179. <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
  180. comment="Value ID"/>
  181. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  182. default="0" comment="Attribute ID"/>
  183. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  184. default="0" comment="Store ID"/>
  185. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  186. default="0" comment="Entity ID"/>
  187. <column xsi:type="varchar" name="value" nullable="true" length="255" comment="Value"/>
  188. <constraint xsi:type="primary" referenceId="PRIMARY">
  189. <column name="value_id"/>
  190. </constraint>
  191. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_VCHR_ATTR_ID_EAV_ATTR_ATTR_ID"
  192. table="catalog_product_entity_varchar" column="attribute_id" referenceTable="eav_attribute"
  193. referenceColumn="attribute_id" onDelete="CASCADE"/>
  194. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_VCHR_ENTT_ID_CAT_PRD_ENTT_ENTT_ID"
  195. table="catalog_product_entity_varchar" column="entity_id" referenceTable="catalog_product_entity"
  196. referenceColumn="entity_id" onDelete="CASCADE"/>
  197. <constraint xsi:type="foreign" referenceId="CATALOG_PRODUCT_ENTITY_VARCHAR_STORE_ID_STORE_STORE_ID"
  198. table="catalog_product_entity_varchar" column="store_id" referenceTable="store"
  199. referenceColumn="store_id" onDelete="CASCADE"/>
  200. <constraint xsi:type="unique" referenceId="CATALOG_PRODUCT_ENTITY_VARCHAR_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
  201. <column name="entity_id"/>
  202. <column name="attribute_id"/>
  203. <column name="store_id"/>
  204. </constraint>
  205. <index referenceId="CATALOG_PRODUCT_ENTITY_VARCHAR_ATTRIBUTE_ID" indexType="btree">
  206. <column name="attribute_id"/>
  207. </index>
  208. <index referenceId="CATALOG_PRODUCT_ENTITY_VARCHAR_STORE_ID" indexType="btree">
  209. <column name="store_id"/>
  210. </index>
  211. </table>
  212. <table name="catalog_product_entity_gallery" resource="default" engine="innodb"
  213. comment="Catalog Product Gallery Attribute Backend Table">
  214. <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
  215. comment="Value ID"/>
  216. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  217. default="0" comment="Attribute ID"/>
  218. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  219. default="0" comment="Store ID"/>
  220. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  221. default="0" comment="Entity ID"/>
  222. <column xsi:type="int" name="position" padding="11" unsigned="false" nullable="false" identity="false"
  223. default="0" comment="Position"/>
  224. <column xsi:type="varchar" name="value" nullable="true" length="255" comment="Value"/>
  225. <constraint xsi:type="primary" referenceId="PRIMARY">
  226. <column name="value_id"/>
  227. </constraint>
  228. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_GLR_ATTR_ID_EAV_ATTR_ATTR_ID"
  229. table="catalog_product_entity_gallery" column="attribute_id" referenceTable="eav_attribute"
  230. referenceColumn="attribute_id" onDelete="CASCADE"/>
  231. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_GLR_ENTT_ID_CAT_PRD_ENTT_ENTT_ID"
  232. table="catalog_product_entity_gallery" column="entity_id" referenceTable="catalog_product_entity"
  233. referenceColumn="entity_id" onDelete="CASCADE"/>
  234. <constraint xsi:type="foreign" referenceId="CATALOG_PRODUCT_ENTITY_GALLERY_STORE_ID_STORE_STORE_ID"
  235. table="catalog_product_entity_gallery" column="store_id" referenceTable="store"
  236. referenceColumn="store_id" onDelete="CASCADE"/>
  237. <constraint xsi:type="unique" referenceId="CATALOG_PRODUCT_ENTITY_GALLERY_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
  238. <column name="entity_id"/>
  239. <column name="attribute_id"/>
  240. <column name="store_id"/>
  241. </constraint>
  242. <index referenceId="CATALOG_PRODUCT_ENTITY_GALLERY_ENTITY_ID" indexType="btree">
  243. <column name="entity_id"/>
  244. </index>
  245. <index referenceId="CATALOG_PRODUCT_ENTITY_GALLERY_ATTRIBUTE_ID" indexType="btree">
  246. <column name="attribute_id"/>
  247. </index>
  248. <index referenceId="CATALOG_PRODUCT_ENTITY_GALLERY_STORE_ID" indexType="btree">
  249. <column name="store_id"/>
  250. </index>
  251. </table>
  252. <table name="catalog_category_entity" resource="default" engine="innodb" comment="Catalog Category Table">
  253. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
  254. comment="Entity ID"/>
  255. <column xsi:type="smallint" name="attribute_set_id" padding="5" unsigned="true" nullable="false"
  256. identity="false" default="0" comment="Attribute Set ID"/>
  257. <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
  258. default="0" comment="Parent Category ID"/>
  259. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  260. comment="Creation Time"/>
  261. <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
  262. comment="Update Time"/>
  263. <column xsi:type="varchar" name="path" nullable="false" length="255" comment="Tree Path"/>
  264. <column xsi:type="int" name="position" padding="11" unsigned="false" nullable="false" identity="false"
  265. comment="Position"/>
  266. <column xsi:type="int" name="level" padding="11" unsigned="false" nullable="false" identity="false" default="0"
  267. comment="Tree Level"/>
  268. <column xsi:type="int" name="children_count" padding="11" unsigned="false" nullable="false" identity="false"
  269. comment="Child Count"/>
  270. <constraint xsi:type="primary" referenceId="PRIMARY">
  271. <column name="entity_id"/>
  272. </constraint>
  273. <index referenceId="CATALOG_CATEGORY_ENTITY_LEVEL" indexType="btree">
  274. <column name="level"/>
  275. </index>
  276. <index referenceId="CATALOG_CATEGORY_ENTITY_PATH" indexType="btree">
  277. <column name="path"/>
  278. </index>
  279. </table>
  280. <table name="catalog_category_entity_datetime" resource="default" engine="innodb"
  281. comment="Catalog Category Datetime Attribute Backend Table">
  282. <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
  283. comment="Value ID"/>
  284. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  285. default="0" comment="Attribute ID"/>
  286. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  287. default="0" comment="Store ID"/>
  288. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  289. default="0" comment="Entity ID"/>
  290. <column xsi:type="datetime" name="value" on_update="false" nullable="true" comment="Value"/>
  291. <constraint xsi:type="primary" referenceId="PRIMARY">
  292. <column name="value_id"/>
  293. </constraint>
  294. <constraint xsi:type="foreign" referenceId="CAT_CTGR_ENTT_DTIME_ATTR_ID_EAV_ATTR_ATTR_ID"
  295. table="catalog_category_entity_datetime" column="attribute_id" referenceTable="eav_attribute"
  296. referenceColumn="attribute_id" onDelete="CASCADE"/>
  297. <constraint xsi:type="foreign" referenceId="CAT_CTGR_ENTT_DTIME_ENTT_ID_CAT_CTGR_ENTT_ENTT_ID"
  298. table="catalog_category_entity_datetime" column="entity_id" referenceTable="catalog_category_entity"
  299. referenceColumn="entity_id" onDelete="CASCADE"/>
  300. <constraint xsi:type="foreign" referenceId="CATALOG_CATEGORY_ENTITY_DATETIME_STORE_ID_STORE_STORE_ID"
  301. table="catalog_category_entity_datetime" column="store_id" referenceTable="store"
  302. referenceColumn="store_id" onDelete="CASCADE"/>
  303. <constraint xsi:type="unique" referenceId="CATALOG_CATEGORY_ENTITY_DATETIME_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
  304. <column name="entity_id"/>
  305. <column name="attribute_id"/>
  306. <column name="store_id"/>
  307. </constraint>
  308. <index referenceId="CATALOG_CATEGORY_ENTITY_DATETIME_ENTITY_ID" indexType="btree">
  309. <column name="entity_id"/>
  310. </index>
  311. <index referenceId="CATALOG_CATEGORY_ENTITY_DATETIME_ATTRIBUTE_ID" indexType="btree">
  312. <column name="attribute_id"/>
  313. </index>
  314. <index referenceId="CATALOG_CATEGORY_ENTITY_DATETIME_STORE_ID" indexType="btree">
  315. <column name="store_id"/>
  316. </index>
  317. </table>
  318. <table name="catalog_category_entity_decimal" resource="default" engine="innodb"
  319. comment="Catalog Category Decimal Attribute Backend Table">
  320. <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
  321. comment="Value ID"/>
  322. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  323. default="0" comment="Attribute ID"/>
  324. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  325. default="0" comment="Store ID"/>
  326. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  327. default="0" comment="Entity ID"/>
  328. <column xsi:type="decimal" name="value" scale="4" precision="12" unsigned="false" nullable="true"
  329. comment="Value"/>
  330. <constraint xsi:type="primary" referenceId="PRIMARY">
  331. <column name="value_id"/>
  332. </constraint>
  333. <constraint xsi:type="foreign" referenceId="CAT_CTGR_ENTT_DEC_ATTR_ID_EAV_ATTR_ATTR_ID"
  334. table="catalog_category_entity_decimal" column="attribute_id" referenceTable="eav_attribute"
  335. referenceColumn="attribute_id" onDelete="CASCADE"/>
  336. <constraint xsi:type="foreign" referenceId="CAT_CTGR_ENTT_DEC_ENTT_ID_CAT_CTGR_ENTT_ENTT_ID"
  337. table="catalog_category_entity_decimal" column="entity_id" referenceTable="catalog_category_entity"
  338. referenceColumn="entity_id" onDelete="CASCADE"/>
  339. <constraint xsi:type="foreign" referenceId="CATALOG_CATEGORY_ENTITY_DECIMAL_STORE_ID_STORE_STORE_ID"
  340. table="catalog_category_entity_decimal" column="store_id" referenceTable="store"
  341. referenceColumn="store_id" onDelete="CASCADE"/>
  342. <constraint xsi:type="unique" referenceId="CATALOG_CATEGORY_ENTITY_DECIMAL_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
  343. <column name="entity_id"/>
  344. <column name="attribute_id"/>
  345. <column name="store_id"/>
  346. </constraint>
  347. <index referenceId="CATALOG_CATEGORY_ENTITY_DECIMAL_ENTITY_ID" indexType="btree">
  348. <column name="entity_id"/>
  349. </index>
  350. <index referenceId="CATALOG_CATEGORY_ENTITY_DECIMAL_ATTRIBUTE_ID" indexType="btree">
  351. <column name="attribute_id"/>
  352. </index>
  353. <index referenceId="CATALOG_CATEGORY_ENTITY_DECIMAL_STORE_ID" indexType="btree">
  354. <column name="store_id"/>
  355. </index>
  356. </table>
  357. <table name="catalog_category_entity_int" resource="default" engine="innodb"
  358. comment="Catalog Category Integer Attribute Backend Table">
  359. <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
  360. comment="Value ID"/>
  361. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  362. default="0" comment="Attribute ID"/>
  363. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  364. default="0" comment="Store ID"/>
  365. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  366. default="0" comment="Entity ID"/>
  367. <column xsi:type="int" name="value" padding="11" unsigned="false" nullable="true" identity="false"
  368. comment="Value"/>
  369. <constraint xsi:type="primary" referenceId="PRIMARY">
  370. <column name="value_id"/>
  371. </constraint>
  372. <constraint xsi:type="foreign" referenceId="CAT_CTGR_ENTT_INT_ATTR_ID_EAV_ATTR_ATTR_ID"
  373. table="catalog_category_entity_int" column="attribute_id" referenceTable="eav_attribute"
  374. referenceColumn="attribute_id" onDelete="CASCADE"/>
  375. <constraint xsi:type="foreign" referenceId="CAT_CTGR_ENTT_INT_ENTT_ID_CAT_CTGR_ENTT_ENTT_ID"
  376. table="catalog_category_entity_int" column="entity_id" referenceTable="catalog_category_entity"
  377. referenceColumn="entity_id" onDelete="CASCADE"/>
  378. <constraint xsi:type="foreign" referenceId="CATALOG_CATEGORY_ENTITY_INT_STORE_ID_STORE_STORE_ID"
  379. table="catalog_category_entity_int" column="store_id" referenceTable="store"
  380. referenceColumn="store_id" onDelete="CASCADE"/>
  381. <constraint xsi:type="unique" referenceId="CATALOG_CATEGORY_ENTITY_INT_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
  382. <column name="entity_id"/>
  383. <column name="attribute_id"/>
  384. <column name="store_id"/>
  385. </constraint>
  386. <index referenceId="CATALOG_CATEGORY_ENTITY_INT_ENTITY_ID" indexType="btree">
  387. <column name="entity_id"/>
  388. </index>
  389. <index referenceId="CATALOG_CATEGORY_ENTITY_INT_ATTRIBUTE_ID" indexType="btree">
  390. <column name="attribute_id"/>
  391. </index>
  392. <index referenceId="CATALOG_CATEGORY_ENTITY_INT_STORE_ID" indexType="btree">
  393. <column name="store_id"/>
  394. </index>
  395. </table>
  396. <table name="catalog_category_entity_text" resource="default" engine="innodb"
  397. comment="Catalog Category Text Attribute Backend Table">
  398. <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
  399. comment="Value ID"/>
  400. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  401. default="0" comment="Attribute ID"/>
  402. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  403. default="0" comment="Store ID"/>
  404. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  405. default="0" comment="Entity ID"/>
  406. <column xsi:type="text" name="value" nullable="true" comment="Value"/>
  407. <constraint xsi:type="primary" referenceId="PRIMARY">
  408. <column name="value_id"/>
  409. </constraint>
  410. <constraint xsi:type="foreign" referenceId="CAT_CTGR_ENTT_TEXT_ATTR_ID_EAV_ATTR_ATTR_ID"
  411. table="catalog_category_entity_text" column="attribute_id" referenceTable="eav_attribute"
  412. referenceColumn="attribute_id" onDelete="CASCADE"/>
  413. <constraint xsi:type="foreign" referenceId="CAT_CTGR_ENTT_TEXT_ENTT_ID_CAT_CTGR_ENTT_ENTT_ID"
  414. table="catalog_category_entity_text" column="entity_id" referenceTable="catalog_category_entity"
  415. referenceColumn="entity_id" onDelete="CASCADE"/>
  416. <constraint xsi:type="foreign" referenceId="CATALOG_CATEGORY_ENTITY_TEXT_STORE_ID_STORE_STORE_ID"
  417. table="catalog_category_entity_text" column="store_id" referenceTable="store"
  418. referenceColumn="store_id" onDelete="CASCADE"/>
  419. <constraint xsi:type="unique" referenceId="CATALOG_CATEGORY_ENTITY_TEXT_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
  420. <column name="entity_id"/>
  421. <column name="attribute_id"/>
  422. <column name="store_id"/>
  423. </constraint>
  424. <index referenceId="CATALOG_CATEGORY_ENTITY_TEXT_ENTITY_ID" indexType="btree">
  425. <column name="entity_id"/>
  426. </index>
  427. <index referenceId="CATALOG_CATEGORY_ENTITY_TEXT_ATTRIBUTE_ID" indexType="btree">
  428. <column name="attribute_id"/>
  429. </index>
  430. <index referenceId="CATALOG_CATEGORY_ENTITY_TEXT_STORE_ID" indexType="btree">
  431. <column name="store_id"/>
  432. </index>
  433. </table>
  434. <table name="catalog_category_entity_varchar" resource="default" engine="innodb"
  435. comment="Catalog Category Varchar Attribute Backend Table">
  436. <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
  437. comment="Value ID"/>
  438. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  439. default="0" comment="Attribute ID"/>
  440. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  441. default="0" comment="Store ID"/>
  442. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  443. default="0" comment="Entity ID"/>
  444. <column xsi:type="varchar" name="value" nullable="true" length="255" comment="Value"/>
  445. <constraint xsi:type="primary" referenceId="PRIMARY">
  446. <column name="value_id"/>
  447. </constraint>
  448. <constraint xsi:type="foreign" referenceId="CAT_CTGR_ENTT_VCHR_ATTR_ID_EAV_ATTR_ATTR_ID"
  449. table="catalog_category_entity_varchar" column="attribute_id" referenceTable="eav_attribute"
  450. referenceColumn="attribute_id" onDelete="CASCADE"/>
  451. <constraint xsi:type="foreign" referenceId="CAT_CTGR_ENTT_VCHR_ENTT_ID_CAT_CTGR_ENTT_ENTT_ID"
  452. table="catalog_category_entity_varchar" column="entity_id" referenceTable="catalog_category_entity"
  453. referenceColumn="entity_id" onDelete="CASCADE"/>
  454. <constraint xsi:type="foreign" referenceId="CATALOG_CATEGORY_ENTITY_VARCHAR_STORE_ID_STORE_STORE_ID"
  455. table="catalog_category_entity_varchar" column="store_id" referenceTable="store"
  456. referenceColumn="store_id" onDelete="CASCADE"/>
  457. <constraint xsi:type="unique" referenceId="CATALOG_CATEGORY_ENTITY_VARCHAR_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
  458. <column name="entity_id"/>
  459. <column name="attribute_id"/>
  460. <column name="store_id"/>
  461. </constraint>
  462. <index referenceId="CATALOG_CATEGORY_ENTITY_VARCHAR_ENTITY_ID" indexType="btree">
  463. <column name="entity_id"/>
  464. </index>
  465. <index referenceId="CATALOG_CATEGORY_ENTITY_VARCHAR_ATTRIBUTE_ID" indexType="btree">
  466. <column name="attribute_id"/>
  467. </index>
  468. <index referenceId="CATALOG_CATEGORY_ENTITY_VARCHAR_STORE_ID" indexType="btree">
  469. <column name="store_id"/>
  470. </index>
  471. </table>
  472. <table name="catalog_category_product" resource="default" engine="innodb"
  473. comment="Catalog Product To Category Linkage Table">
  474. <column xsi:type="int" name="entity_id" padding="11" unsigned="false" nullable="false" identity="true"
  475. comment="Entity ID"/>
  476. <column xsi:type="int" name="category_id" padding="10" unsigned="true" nullable="false" identity="false"
  477. default="0" comment="Category ID"/>
  478. <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
  479. default="0" comment="Product ID"/>
  480. <column xsi:type="int" name="position" padding="11" unsigned="false" nullable="false" identity="false"
  481. default="0" comment="Position"/>
  482. <constraint xsi:type="primary" referenceId="PRIMARY">
  483. <column name="entity_id"/>
  484. <column name="category_id"/>
  485. <column name="product_id"/>
  486. </constraint>
  487. <constraint xsi:type="foreign" referenceId="CAT_CTGR_PRD_PRD_ID_CAT_PRD_ENTT_ENTT_ID" table="catalog_category_product"
  488. column="product_id" referenceTable="catalog_product_entity" referenceColumn="entity_id"
  489. onDelete="CASCADE"/>
  490. <constraint xsi:type="foreign" referenceId="CAT_CTGR_PRD_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID"
  491. table="catalog_category_product" column="category_id" referenceTable="catalog_category_entity"
  492. referenceColumn="entity_id" onDelete="CASCADE"/>
  493. <constraint xsi:type="unique" referenceId="CATALOG_CATEGORY_PRODUCT_CATEGORY_ID_PRODUCT_ID">
  494. <column name="category_id"/>
  495. <column name="product_id"/>
  496. </constraint>
  497. <index referenceId="CATALOG_CATEGORY_PRODUCT_PRODUCT_ID" indexType="btree">
  498. <column name="product_id"/>
  499. </index>
  500. </table>
  501. <table name="catalog_category_product_index" resource="default" engine="innodb"
  502. comment="Catalog Category Product Index">
  503. <column xsi:type="int" name="category_id" padding="10" unsigned="true" nullable="false" identity="false"
  504. default="0" comment="Category ID"/>
  505. <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
  506. default="0" comment="Product ID"/>
  507. <column xsi:type="int" name="position" padding="11" unsigned="false" nullable="true" identity="false"
  508. comment="Position"/>
  509. <column xsi:type="smallint" name="is_parent" padding="5" unsigned="true" nullable="false" identity="false"
  510. default="0" comment="Is Parent"/>
  511. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  512. default="0" comment="Store ID"/>
  513. <column xsi:type="smallint" name="visibility" padding="5" unsigned="true" nullable="false" identity="false"
  514. comment="Visibility"/>
  515. <constraint xsi:type="primary" referenceId="PRIMARY">
  516. <column name="category_id"/>
  517. <column name="product_id"/>
  518. <column name="store_id"/>
  519. </constraint>
  520. <index referenceId="CAT_CTGR_PRD_IDX_PRD_ID_STORE_ID_CTGR_ID_VISIBILITY" indexType="btree">
  521. <column name="product_id"/>
  522. <column name="store_id"/>
  523. <column name="category_id"/>
  524. <column name="visibility"/>
  525. </index>
  526. <index referenceId="CAT_CTGR_PRD_IDX_STORE_ID_CTGR_ID_VISIBILITY_IS_PARENT_POSITION" indexType="btree">
  527. <column name="store_id"/>
  528. <column name="category_id"/>
  529. <column name="visibility"/>
  530. <column name="is_parent"/>
  531. <column name="position"/>
  532. </index>
  533. </table>
  534. <table name="catalog_compare_item" resource="default" engine="innodb" comment="Catalog Compare Table">
  535. <column xsi:type="int" name="catalog_compare_item_id" padding="10" unsigned="true" nullable="false"
  536. identity="true" comment="Compare Item ID"/>
  537. <column xsi:type="int" name="visitor_id" padding="10" unsigned="true" nullable="false" identity="false"
  538. default="0" comment="Visitor ID"/>
  539. <column xsi:type="int" name="customer_id" padding="10" unsigned="true" nullable="true" identity="false"
  540. comment="Customer ID"/>
  541. <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
  542. default="0" comment="Product ID"/>
  543. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  544. comment="Store ID"/>
  545. <constraint xsi:type="primary" referenceId="PRIMARY">
  546. <column name="catalog_compare_item_id"/>
  547. </constraint>
  548. <constraint xsi:type="foreign" referenceId="CATALOG_COMPARE_ITEM_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID"
  549. table="catalog_compare_item" column="customer_id" referenceTable="customer_entity"
  550. referenceColumn="entity_id" onDelete="CASCADE"/>
  551. <constraint xsi:type="foreign" referenceId="CATALOG_COMPARE_ITEM_PRODUCT_ID_CATALOG_PRODUCT_ENTITY_ENTITY_ID"
  552. table="catalog_compare_item" column="product_id" referenceTable="catalog_product_entity"
  553. referenceColumn="entity_id" onDelete="CASCADE"/>
  554. <constraint xsi:type="foreign" referenceId="CATALOG_COMPARE_ITEM_STORE_ID_STORE_STORE_ID" table="catalog_compare_item"
  555. column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="SET NULL"/>
  556. <index referenceId="CATALOG_COMPARE_ITEM_PRODUCT_ID" indexType="btree">
  557. <column name="product_id"/>
  558. </index>
  559. <index referenceId="CATALOG_COMPARE_ITEM_VISITOR_ID_PRODUCT_ID" indexType="btree">
  560. <column name="visitor_id"/>
  561. <column name="product_id"/>
  562. </index>
  563. <index referenceId="CATALOG_COMPARE_ITEM_CUSTOMER_ID_PRODUCT_ID" indexType="btree">
  564. <column name="customer_id"/>
  565. <column name="product_id"/>
  566. </index>
  567. <index referenceId="CATALOG_COMPARE_ITEM_STORE_ID" indexType="btree">
  568. <column name="store_id"/>
  569. </index>
  570. </table>
  571. <table name="catalog_product_website" resource="default" engine="innodb"
  572. comment="Catalog Product To Website Linkage Table">
  573. <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
  574. comment="Product ID"/>
  575. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  576. comment="Website ID"/>
  577. <constraint xsi:type="primary" referenceId="PRIMARY">
  578. <column name="product_id"/>
  579. <column name="website_id"/>
  580. </constraint>
  581. <constraint xsi:type="foreign" referenceId="CATALOG_PRODUCT_WEBSITE_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID"
  582. table="catalog_product_website" column="website_id" referenceTable="store_website"
  583. referenceColumn="website_id" onDelete="CASCADE"/>
  584. <constraint xsi:type="foreign" referenceId="CAT_PRD_WS_PRD_ID_CAT_PRD_ENTT_ENTT_ID" table="catalog_product_website"
  585. column="product_id" referenceTable="catalog_product_entity" referenceColumn="entity_id"
  586. onDelete="CASCADE"/>
  587. <index referenceId="CATALOG_PRODUCT_WEBSITE_WEBSITE_ID" indexType="btree">
  588. <column name="website_id"/>
  589. </index>
  590. </table>
  591. <table name="catalog_product_link_type" resource="default" engine="innodb"
  592. comment="Catalog Product Link Type Table">
  593. <column xsi:type="smallint" name="link_type_id" padding="5" unsigned="true" nullable="false" identity="true"
  594. comment="Link Type ID"/>
  595. <column xsi:type="varchar" name="code" nullable="true" length="32" comment="Code"/>
  596. <constraint xsi:type="primary" referenceId="PRIMARY">
  597. <column name="link_type_id"/>
  598. </constraint>
  599. </table>
  600. <table name="catalog_product_link" resource="default" engine="innodb"
  601. comment="Catalog Product To Product Linkage Table">
  602. <column xsi:type="int" name="link_id" padding="10" unsigned="true" nullable="false" identity="true"
  603. comment="Link ID"/>
  604. <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
  605. default="0" comment="Product ID"/>
  606. <column xsi:type="int" name="linked_product_id" padding="10" unsigned="true" nullable="false" identity="false"
  607. default="0" comment="Linked Product ID"/>
  608. <column xsi:type="smallint" name="link_type_id" padding="5" unsigned="true" nullable="false" identity="false"
  609. default="0" comment="Link Type ID"/>
  610. <constraint xsi:type="primary" referenceId="PRIMARY">
  611. <column name="link_id"/>
  612. </constraint>
  613. <constraint xsi:type="foreign" referenceId="CAT_PRD_LNK_LNKED_PRD_ID_CAT_PRD_ENTT_ENTT_ID" table="catalog_product_link"
  614. column="linked_product_id" referenceTable="catalog_product_entity" referenceColumn="entity_id"
  615. onDelete="CASCADE"/>
  616. <constraint xsi:type="foreign" referenceId="CATALOG_PRODUCT_LINK_PRODUCT_ID_CATALOG_PRODUCT_ENTITY_ENTITY_ID"
  617. table="catalog_product_link" column="product_id" referenceTable="catalog_product_entity"
  618. referenceColumn="entity_id" onDelete="CASCADE"/>
  619. <constraint xsi:type="foreign" referenceId="CAT_PRD_LNK_LNK_TYPE_ID_CAT_PRD_LNK_TYPE_LNK_TYPE_ID"
  620. table="catalog_product_link" column="link_type_id" referenceTable="catalog_product_link_type"
  621. referenceColumn="link_type_id" onDelete="CASCADE"/>
  622. <constraint xsi:type="unique" referenceId="CATALOG_PRODUCT_LINK_LINK_TYPE_ID_PRODUCT_ID_LINKED_PRODUCT_ID">
  623. <column name="link_type_id"/>
  624. <column name="product_id"/>
  625. <column name="linked_product_id"/>
  626. </constraint>
  627. <index referenceId="CATALOG_PRODUCT_LINK_PRODUCT_ID" indexType="btree">
  628. <column name="product_id"/>
  629. </index>
  630. <index referenceId="CATALOG_PRODUCT_LINK_LINKED_PRODUCT_ID" indexType="btree">
  631. <column name="linked_product_id"/>
  632. </index>
  633. </table>
  634. <table name="catalog_product_link_attribute" resource="default" engine="innodb"
  635. comment="Catalog Product Link Attribute Table">
  636. <column xsi:type="smallint" name="product_link_attribute_id" padding="5" unsigned="true" nullable="false"
  637. identity="true" comment="Product Link Attribute ID"/>
  638. <column xsi:type="smallint" name="link_type_id" padding="5" unsigned="true" nullable="false" identity="false"
  639. default="0" comment="Link Type ID"/>
  640. <column xsi:type="varchar" name="product_link_attribute_code" nullable="true" length="32"
  641. comment="Product Link Attribute Code"/>
  642. <column xsi:type="varchar" name="data_type" nullable="true" length="32" comment="Data Type"/>
  643. <constraint xsi:type="primary" referenceId="PRIMARY">
  644. <column name="product_link_attribute_id"/>
  645. </constraint>
  646. <constraint xsi:type="foreign" referenceId="CAT_PRD_LNK_ATTR_LNK_TYPE_ID_CAT_PRD_LNK_TYPE_LNK_TYPE_ID"
  647. table="catalog_product_link_attribute" column="link_type_id"
  648. referenceTable="catalog_product_link_type" referenceColumn="link_type_id" onDelete="CASCADE"/>
  649. <index referenceId="CATALOG_PRODUCT_LINK_ATTRIBUTE_LINK_TYPE_ID" indexType="btree">
  650. <column name="link_type_id"/>
  651. </index>
  652. </table>
  653. <table name="catalog_product_link_attribute_decimal" resource="default" engine="innodb"
  654. comment="Catalog Product Link Decimal Attribute Table">
  655. <column xsi:type="int" name="value_id" padding="10" unsigned="true" nullable="false" identity="true"
  656. comment="Value ID"/>
  657. <column xsi:type="smallint" name="product_link_attribute_id" padding="5" unsigned="true" nullable="true"
  658. identity="false" comment="Product Link Attribute ID"/>
  659. <column xsi:type="int" name="link_id" padding="10" unsigned="true" nullable="false" identity="false"
  660. comment="Link ID"/>
  661. <column xsi:type="decimal" name="value" scale="4" precision="12" unsigned="false" nullable="false" default="0"
  662. comment="Value"/>
  663. <constraint xsi:type="primary" referenceId="PRIMARY">
  664. <column name="value_id"/>
  665. </constraint>
  666. <constraint xsi:type="foreign" referenceId="CAT_PRD_LNK_ATTR_DEC_LNK_ID_CAT_PRD_LNK_LNK_ID"
  667. table="catalog_product_link_attribute_decimal" column="link_id"
  668. referenceTable="catalog_product_link" referenceColumn="link_id" onDelete="CASCADE"/>
  669. <constraint xsi:type="foreign" referenceId="FK_AB2EFA9A14F7BCF1D5400056203D14B6"
  670. table="catalog_product_link_attribute_decimal" column="product_link_attribute_id"
  671. referenceTable="catalog_product_link_attribute" referenceColumn="product_link_attribute_id"
  672. onDelete="CASCADE"/>
  673. <constraint xsi:type="unique" referenceId="CAT_PRD_LNK_ATTR_DEC_PRD_LNK_ATTR_ID_LNK_ID">
  674. <column name="product_link_attribute_id"/>
  675. <column name="link_id"/>
  676. </constraint>
  677. <index referenceId="CATALOG_PRODUCT_LINK_ATTRIBUTE_DECIMAL_LINK_ID" indexType="btree">
  678. <column name="link_id"/>
  679. </index>
  680. </table>
  681. <table name="catalog_product_link_attribute_int" resource="default" engine="innodb"
  682. comment="Catalog Product Link Integer Attribute Table">
  683. <column xsi:type="int" name="value_id" padding="10" unsigned="true" nullable="false" identity="true"
  684. comment="Value ID"/>
  685. <column xsi:type="smallint" name="product_link_attribute_id" padding="5" unsigned="true" nullable="true"
  686. identity="false" comment="Product Link Attribute ID"/>
  687. <column xsi:type="int" name="link_id" padding="10" unsigned="true" nullable="false" identity="false"
  688. comment="Link ID"/>
  689. <column xsi:type="int" name="value" padding="11" unsigned="false" nullable="false" identity="false" default="0"
  690. comment="Value"/>
  691. <constraint xsi:type="primary" referenceId="PRIMARY">
  692. <column name="value_id"/>
  693. </constraint>
  694. <constraint xsi:type="foreign" referenceId="CAT_PRD_LNK_ATTR_INT_LNK_ID_CAT_PRD_LNK_LNK_ID"
  695. table="catalog_product_link_attribute_int" column="link_id" referenceTable="catalog_product_link"
  696. referenceColumn="link_id" onDelete="CASCADE"/>
  697. <constraint xsi:type="foreign" referenceId="FK_D6D878F8BA2A4282F8DDED7E6E3DE35C"
  698. table="catalog_product_link_attribute_int" column="product_link_attribute_id"
  699. referenceTable="catalog_product_link_attribute" referenceColumn="product_link_attribute_id"
  700. onDelete="CASCADE"/>
  701. <constraint xsi:type="unique" referenceId="CAT_PRD_LNK_ATTR_INT_PRD_LNK_ATTR_ID_LNK_ID">
  702. <column name="product_link_attribute_id"/>
  703. <column name="link_id"/>
  704. </constraint>
  705. <index referenceId="CATALOG_PRODUCT_LINK_ATTRIBUTE_INT_LINK_ID" indexType="btree">
  706. <column name="link_id"/>
  707. </index>
  708. </table>
  709. <table name="catalog_product_link_attribute_varchar" resource="default" engine="innodb"
  710. comment="Catalog Product Link Varchar Attribute Table">
  711. <column xsi:type="int" name="value_id" padding="10" unsigned="true" nullable="false" identity="true"
  712. comment="Value ID"/>
  713. <column xsi:type="smallint" name="product_link_attribute_id" padding="5" unsigned="true" nullable="false"
  714. identity="false" default="0" comment="Product Link Attribute ID"/>
  715. <column xsi:type="int" name="link_id" padding="10" unsigned="true" nullable="false" identity="false"
  716. comment="Link ID"/>
  717. <column xsi:type="varchar" name="value" nullable="true" length="255" comment="Value"/>
  718. <constraint xsi:type="primary" referenceId="PRIMARY">
  719. <column name="value_id"/>
  720. </constraint>
  721. <constraint xsi:type="foreign" referenceId="CAT_PRD_LNK_ATTR_VCHR_LNK_ID_CAT_PRD_LNK_LNK_ID"
  722. table="catalog_product_link_attribute_varchar" column="link_id"
  723. referenceTable="catalog_product_link" referenceColumn="link_id" onDelete="CASCADE"/>
  724. <constraint xsi:type="foreign" referenceId="FK_DEE9C4DA61CFCC01DFCF50F0D79CEA51"
  725. table="catalog_product_link_attribute_varchar" column="product_link_attribute_id"
  726. referenceTable="catalog_product_link_attribute" referenceColumn="product_link_attribute_id"
  727. onDelete="CASCADE"/>
  728. <constraint xsi:type="unique" referenceId="CAT_PRD_LNK_ATTR_VCHR_PRD_LNK_ATTR_ID_LNK_ID">
  729. <column name="product_link_attribute_id"/>
  730. <column name="link_id"/>
  731. </constraint>
  732. <index referenceId="CATALOG_PRODUCT_LINK_ATTRIBUTE_VARCHAR_LINK_ID" indexType="btree">
  733. <column name="link_id"/>
  734. </index>
  735. </table>
  736. <table name="catalog_product_entity_tier_price" resource="default" engine="innodb"
  737. comment="Catalog Product Tier Price Attribute Backend Table">
  738. <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
  739. comment="Value ID"/>
  740. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  741. default="0" comment="Entity ID"/>
  742. <column xsi:type="smallint" name="all_groups" padding="5" unsigned="true" nullable="false" identity="false"
  743. default="1" comment="Is Applicable To All Customer Groups"/>
  744. <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false"
  745. default="0" comment="Customer Group ID"/>
  746. <column xsi:type="decimal" name="qty" scale="4" precision="12" unsigned="false" nullable="false" default="1"
  747. comment="QTY"/>
  748. <column xsi:type="decimal" name="value" scale="4" precision="12" unsigned="false" nullable="false" default="0"
  749. comment="Value"/>
  750. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  751. comment="Website ID"/>
  752. <column xsi:type="decimal" name="percentage_value" scale="2" precision="5" unsigned="false" nullable="true"
  753. comment="Percentage value"/>
  754. <constraint xsi:type="primary" referenceId="PRIMARY">
  755. <column name="value_id"/>
  756. </constraint>
  757. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_TIER_PRICE_CSTR_GROUP_ID_CSTR_GROUP_CSTR_GROUP_ID"
  758. table="catalog_product_entity_tier_price" column="customer_group_id" referenceTable="customer_group"
  759. referenceColumn="customer_group_id" onDelete="CASCADE"/>
  760. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_TIER_PRICE_ENTT_ID_CAT_PRD_ENTT_ENTT_ID"
  761. table="catalog_product_entity_tier_price" column="entity_id" referenceTable="catalog_product_entity"
  762. referenceColumn="entity_id" onDelete="CASCADE"/>
  763. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_TIER_PRICE_WS_ID_STORE_WS_WS_ID"
  764. table="catalog_product_entity_tier_price" column="website_id" referenceTable="store_website"
  765. referenceColumn="website_id" onDelete="CASCADE"/>
  766. <constraint xsi:type="unique" referenceId="UNQ_E8AB433B9ACB00343ABB312AD2FAB087">
  767. <column name="entity_id"/>
  768. <column name="all_groups"/>
  769. <column name="customer_group_id"/>
  770. <column name="qty"/>
  771. <column name="website_id"/>
  772. </constraint>
  773. <index referenceId="CATALOG_PRODUCT_ENTITY_TIER_PRICE_CUSTOMER_GROUP_ID" indexType="btree">
  774. <column name="customer_group_id"/>
  775. </index>
  776. <index referenceId="CATALOG_PRODUCT_ENTITY_TIER_PRICE_WEBSITE_ID" indexType="btree">
  777. <column name="website_id"/>
  778. </index>
  779. </table>
  780. <table name="catalog_product_entity_media_gallery" resource="default" engine="innodb"
  781. comment="Catalog Product Media Gallery Attribute Backend Table">
  782. <column xsi:type="int" name="value_id" padding="10" unsigned="true" nullable="false" identity="true"
  783. comment="Value ID"/>
  784. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  785. default="0" comment="Attribute ID"/>
  786. <column xsi:type="varchar" name="value" nullable="true" length="255" comment="Value"/>
  787. <column xsi:type="varchar" name="media_type" nullable="false" length="32" default="image"
  788. comment="Media entry type"/>
  789. <column xsi:type="smallint" name="disabled" padding="5" unsigned="true" nullable="false" identity="false"
  790. default="0" comment="Visibility status"/>
  791. <constraint xsi:type="primary" referenceId="PRIMARY">
  792. <column name="value_id"/>
  793. </constraint>
  794. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_MDA_GLR_ATTR_ID_EAV_ATTR_ATTR_ID"
  795. table="catalog_product_entity_media_gallery" column="attribute_id" referenceTable="eav_attribute"
  796. referenceColumn="attribute_id" onDelete="CASCADE"/>
  797. <index referenceId="CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_ATTRIBUTE_ID" indexType="btree">
  798. <column name="attribute_id"/>
  799. </index>
  800. </table>
  801. <table name="catalog_product_entity_media_gallery_value" resource="default" engine="innodb"
  802. comment="Catalog Product Media Gallery Attribute Value Table">
  803. <column xsi:type="int" name="value_id" padding="10" unsigned="true" nullable="false" identity="false"
  804. default="0" comment="Value ID"/>
  805. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  806. default="0" comment="Store ID"/>
  807. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  808. default="0" comment="Entity ID"/>
  809. <column xsi:type="varchar" name="label" nullable="true" length="255" comment="Label"/>
  810. <column xsi:type="int" name="position" padding="10" unsigned="true" nullable="true" identity="false"
  811. comment="Position"/>
  812. <column xsi:type="smallint" name="disabled" padding="5" unsigned="true" nullable="false" identity="false"
  813. default="0" comment="Is Disabled"/>
  814. <column xsi:type="int" name="record_id" padding="10" unsigned="true" nullable="false" identity="true"
  815. comment="Record Id"/>
  816. <constraint xsi:type="primary" referenceId="PRIMARY">
  817. <column name="record_id"/>
  818. </constraint>
  819. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_MDA_GLR_VAL_VAL_ID_CAT_PRD_ENTT_MDA_GLR_VAL_ID"
  820. table="catalog_product_entity_media_gallery_value" column="value_id"
  821. referenceTable="catalog_product_entity_media_gallery" referenceColumn="value_id"
  822. onDelete="CASCADE"/>
  823. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_MDA_GLR_VAL_STORE_ID_STORE_STORE_ID"
  824. table="catalog_product_entity_media_gallery_value" column="store_id" referenceTable="store"
  825. referenceColumn="store_id" onDelete="CASCADE"/>
  826. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_MDA_GLR_VAL_ENTT_ID_CAT_PRD_ENTT_ENTT_ID"
  827. table="catalog_product_entity_media_gallery_value" column="entity_id"
  828. referenceTable="catalog_product_entity" referenceColumn="entity_id" onDelete="CASCADE"/>
  829. <index referenceId="CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_VALUE_STORE_ID" indexType="btree">
  830. <column name="store_id"/>
  831. </index>
  832. <index referenceId="CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_VALUE_ENTITY_ID" indexType="btree">
  833. <column name="entity_id"/>
  834. </index>
  835. <index referenceId="CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_VALUE_VALUE_ID" indexType="btree">
  836. <column name="value_id"/>
  837. </index>
  838. <index referenceId="CAT_PRD_ENTT_MDA_GLR_VAL_ENTT_ID_VAL_ID_STORE_ID" indexType="btree">
  839. <column name="entity_id"/>
  840. <column name="value_id"/>
  841. <column name="store_id"/>
  842. </index>
  843. </table>
  844. <table name="catalog_product_option" resource="default" engine="innodb" comment="Catalog Product Option Table">
  845. <column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="true"
  846. comment="Option ID"/>
  847. <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
  848. default="0" comment="Product ID"/>
  849. <column xsi:type="varchar" name="type" nullable="true" length="50" comment="Type"/>
  850. <column xsi:type="smallint" name="is_require" padding="6" unsigned="false" nullable="false" identity="false"
  851. default="1" comment="Is Required"/>
  852. <column xsi:type="varchar" name="sku" nullable="true" length="64" comment="SKU"/>
  853. <column xsi:type="int" name="max_characters" padding="10" unsigned="true" nullable="true" identity="false"
  854. comment="Max Characters"/>
  855. <column xsi:type="varchar" name="file_extension" nullable="true" length="50" comment="File Extension"/>
  856. <column xsi:type="smallint" name="image_size_x" padding="5" unsigned="true" nullable="true" identity="false"
  857. comment="Image Size X"/>
  858. <column xsi:type="smallint" name="image_size_y" padding="5" unsigned="true" nullable="true" identity="false"
  859. comment="Image Size Y"/>
  860. <column xsi:type="int" name="sort_order" padding="10" unsigned="true" nullable="false" identity="false"
  861. default="0" comment="Sort Order"/>
  862. <constraint xsi:type="primary" referenceId="PRIMARY">
  863. <column name="option_id"/>
  864. </constraint>
  865. <constraint xsi:type="foreign" referenceId="CAT_PRD_OPT_PRD_ID_CAT_PRD_ENTT_ENTT_ID" table="catalog_product_option"
  866. column="product_id" referenceTable="catalog_product_entity" referenceColumn="entity_id"
  867. onDelete="CASCADE"/>
  868. <index referenceId="CATALOG_PRODUCT_OPTION_PRODUCT_ID" indexType="btree">
  869. <column name="product_id"/>
  870. </index>
  871. </table>
  872. <table name="catalog_product_option_price" resource="default" engine="innodb"
  873. comment="Catalog Product Option Price Table">
  874. <column xsi:type="int" name="option_price_id" padding="10" unsigned="true" nullable="false" identity="true"
  875. comment="Option Price ID"/>
  876. <column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="false"
  877. default="0" comment="Option ID"/>
  878. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  879. default="0" comment="Store ID"/>
  880. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="false" default="0"
  881. comment="Price"/>
  882. <column xsi:type="varchar" name="price_type" nullable="false" length="7" default="fixed" comment="Price Type"/>
  883. <constraint xsi:type="primary" referenceId="PRIMARY">
  884. <column name="option_price_id"/>
  885. </constraint>
  886. <constraint xsi:type="foreign" referenceId="CAT_PRD_OPT_PRICE_OPT_ID_CAT_PRD_OPT_OPT_ID"
  887. table="catalog_product_option_price" column="option_id" referenceTable="catalog_product_option"
  888. referenceColumn="option_id" onDelete="CASCADE"/>
  889. <constraint xsi:type="foreign" referenceId="CATALOG_PRODUCT_OPTION_PRICE_STORE_ID_STORE_STORE_ID"
  890. table="catalog_product_option_price" column="store_id" referenceTable="store"
  891. referenceColumn="store_id" onDelete="CASCADE"/>
  892. <constraint xsi:type="unique" referenceId="CATALOG_PRODUCT_OPTION_PRICE_OPTION_ID_STORE_ID">
  893. <column name="option_id"/>
  894. <column name="store_id"/>
  895. </constraint>
  896. <index referenceId="CATALOG_PRODUCT_OPTION_PRICE_STORE_ID" indexType="btree">
  897. <column name="store_id"/>
  898. </index>
  899. </table>
  900. <table name="catalog_product_option_title" resource="default" engine="innodb"
  901. comment="Catalog Product Option Title Table">
  902. <column xsi:type="int" name="option_title_id" padding="10" unsigned="true" nullable="false" identity="true"
  903. comment="Option Title ID"/>
  904. <column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="false"
  905. default="0" comment="Option ID"/>
  906. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  907. default="0" comment="Store ID"/>
  908. <column xsi:type="varchar" name="title" nullable="true" length="255" comment="Title"/>
  909. <constraint xsi:type="primary" referenceId="PRIMARY">
  910. <column name="option_title_id"/>
  911. </constraint>
  912. <constraint xsi:type="foreign" referenceId="CAT_PRD_OPT_TTL_OPT_ID_CAT_PRD_OPT_OPT_ID"
  913. table="catalog_product_option_title" column="option_id" referenceTable="catalog_product_option"
  914. referenceColumn="option_id" onDelete="CASCADE"/>
  915. <constraint xsi:type="foreign" referenceId="CATALOG_PRODUCT_OPTION_TITLE_STORE_ID_STORE_STORE_ID"
  916. table="catalog_product_option_title" column="store_id" referenceTable="store"
  917. referenceColumn="store_id" onDelete="CASCADE"/>
  918. <constraint xsi:type="unique" referenceId="CATALOG_PRODUCT_OPTION_TITLE_OPTION_ID_STORE_ID">
  919. <column name="option_id"/>
  920. <column name="store_id"/>
  921. </constraint>
  922. <index referenceId="CATALOG_PRODUCT_OPTION_TITLE_STORE_ID" indexType="btree">
  923. <column name="store_id"/>
  924. </index>
  925. </table>
  926. <table name="catalog_product_option_type_value" resource="default" engine="innodb"
  927. comment="Catalog Product Option Type Value Table">
  928. <column xsi:type="int" name="option_type_id" padding="10" unsigned="true" nullable="false" identity="true"
  929. comment="Option Type ID"/>
  930. <column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="false"
  931. default="0" comment="Option ID"/>
  932. <column xsi:type="varchar" name="sku" nullable="true" length="64" comment="SKU"/>
  933. <column xsi:type="int" name="sort_order" padding="10" unsigned="true" nullable="false" identity="false"
  934. default="0" comment="Sort Order"/>
  935. <constraint xsi:type="primary" referenceId="PRIMARY">
  936. <column name="option_type_id"/>
  937. </constraint>
  938. <constraint xsi:type="foreign" referenceId="CAT_PRD_OPT_TYPE_VAL_OPT_ID_CAT_PRD_OPT_OPT_ID"
  939. table="catalog_product_option_type_value" column="option_id" referenceTable="catalog_product_option"
  940. referenceColumn="option_id" onDelete="CASCADE"/>
  941. <index referenceId="CATALOG_PRODUCT_OPTION_TYPE_VALUE_OPTION_ID" indexType="btree">
  942. <column name="option_id"/>
  943. </index>
  944. </table>
  945. <table name="catalog_product_option_type_price" resource="default" engine="innodb"
  946. comment="Catalog Product Option Type Price Table">
  947. <column xsi:type="int" name="option_type_price_id" padding="10" unsigned="true" nullable="false" identity="true"
  948. comment="Option Type Price ID"/>
  949. <column xsi:type="int" name="option_type_id" padding="10" unsigned="true" nullable="false" identity="false"
  950. default="0" comment="Option Type ID"/>
  951. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  952. default="0" comment="Store ID"/>
  953. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="false" default="0"
  954. comment="Price"/>
  955. <column xsi:type="varchar" name="price_type" nullable="false" length="7" default="fixed" comment="Price Type"/>
  956. <constraint xsi:type="primary" referenceId="PRIMARY">
  957. <column name="option_type_price_id"/>
  958. </constraint>
  959. <constraint xsi:type="foreign" referenceId="FK_B523E3378E8602F376CC415825576B7F"
  960. table="catalog_product_option_type_price" column="option_type_id"
  961. referenceTable="catalog_product_option_type_value" referenceColumn="option_type_id"
  962. onDelete="CASCADE"/>
  963. <constraint xsi:type="foreign" referenceId="CATALOG_PRODUCT_OPTION_TYPE_PRICE_STORE_ID_STORE_STORE_ID"
  964. table="catalog_product_option_type_price" column="store_id" referenceTable="store"
  965. referenceColumn="store_id" onDelete="CASCADE"/>
  966. <constraint xsi:type="unique" referenceId="CATALOG_PRODUCT_OPTION_TYPE_PRICE_OPTION_TYPE_ID_STORE_ID">
  967. <column name="option_type_id"/>
  968. <column name="store_id"/>
  969. </constraint>
  970. <index referenceId="CATALOG_PRODUCT_OPTION_TYPE_PRICE_STORE_ID" indexType="btree">
  971. <column name="store_id"/>
  972. </index>
  973. </table>
  974. <table name="catalog_product_option_type_title" resource="default" engine="innodb"
  975. comment="Catalog Product Option Type Title Table">
  976. <column xsi:type="int" name="option_type_title_id" padding="10" unsigned="true" nullable="false" identity="true"
  977. comment="Option Type Title ID"/>
  978. <column xsi:type="int" name="option_type_id" padding="10" unsigned="true" nullable="false" identity="false"
  979. default="0" comment="Option Type ID"/>
  980. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  981. default="0" comment="Store ID"/>
  982. <column xsi:type="varchar" name="title" nullable="true" length="255" comment="Title"/>
  983. <constraint xsi:type="primary" referenceId="PRIMARY">
  984. <column name="option_type_title_id"/>
  985. </constraint>
  986. <constraint xsi:type="foreign" referenceId="FK_C085B9CF2C2A302E8043FDEA1937D6A2"
  987. table="catalog_product_option_type_title" column="option_type_id"
  988. referenceTable="catalog_product_option_type_value" referenceColumn="option_type_id"
  989. onDelete="CASCADE"/>
  990. <constraint xsi:type="foreign" referenceId="CATALOG_PRODUCT_OPTION_TYPE_TITLE_STORE_ID_STORE_STORE_ID"
  991. table="catalog_product_option_type_title" column="store_id" referenceTable="store"
  992. referenceColumn="store_id" onDelete="CASCADE"/>
  993. <constraint xsi:type="unique" referenceId="CATALOG_PRODUCT_OPTION_TYPE_TITLE_OPTION_TYPE_ID_STORE_ID">
  994. <column name="option_type_id"/>
  995. <column name="store_id"/>
  996. </constraint>
  997. <index referenceId="CATALOG_PRODUCT_OPTION_TYPE_TITLE_STORE_ID" indexType="btree">
  998. <column name="store_id"/>
  999. </index>
  1000. </table>
  1001. <table name="catalog_eav_attribute" resource="default" engine="innodb" comment="Catalog EAV Attribute Table">
  1002. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  1003. comment="Attribute ID"/>
  1004. <column xsi:type="varchar" name="frontend_input_renderer" nullable="true" length="255"
  1005. comment="Frontend Input Renderer"/>
  1006. <column xsi:type="smallint" name="is_global" padding="5" unsigned="true" nullable="false" identity="false"
  1007. default="1" comment="Is Global"/>
  1008. <column xsi:type="smallint" name="is_visible" padding="5" unsigned="true" nullable="false" identity="false"
  1009. default="1" comment="Is Visible"/>
  1010. <column xsi:type="smallint" name="is_searchable" padding="5" unsigned="true" nullable="false" identity="false"
  1011. default="0" comment="Is Searchable"/>
  1012. <column xsi:type="smallint" name="is_filterable" padding="5" unsigned="true" nullable="false" identity="false"
  1013. default="0" comment="Is Filterable"/>
  1014. <column xsi:type="smallint" name="is_comparable" padding="5" unsigned="true" nullable="false" identity="false"
  1015. default="0" comment="Is Comparable"/>
  1016. <column xsi:type="smallint" name="is_visible_on_front" padding="5" unsigned="true" nullable="false"
  1017. identity="false" default="0" comment="Is Visible On Front"/>
  1018. <column xsi:type="smallint" name="is_html_allowed_on_front" padding="5" unsigned="true" nullable="false"
  1019. identity="false" default="0" comment="Is HTML Allowed On Front"/>
  1020. <column xsi:type="smallint" name="is_used_for_price_rules" padding="5" unsigned="true" nullable="false"
  1021. identity="false" default="0" comment="Is Used For Price Rules"/>
  1022. <column xsi:type="smallint" name="is_filterable_in_search" padding="5" unsigned="true" nullable="false"
  1023. identity="false" default="0" comment="Is Filterable In Search"/>
  1024. <column xsi:type="smallint" name="used_in_product_listing" padding="5" unsigned="true" nullable="false"
  1025. identity="false" default="0" comment="Is Used In Product Listing"/>
  1026. <column xsi:type="smallint" name="used_for_sort_by" padding="5" unsigned="true" nullable="false"
  1027. identity="false" default="0" comment="Is Used For Sorting"/>
  1028. <column xsi:type="varchar" name="apply_to" nullable="true" length="255" comment="Apply To"/>
  1029. <column xsi:type="smallint" name="is_visible_in_advanced_search" padding="5" unsigned="true" nullable="false"
  1030. identity="false" default="0" comment="Is Visible In Advanced Search"/>
  1031. <column xsi:type="int" name="position" padding="11" unsigned="false" nullable="false" identity="false"
  1032. default="0" comment="Position"/>
  1033. <column xsi:type="smallint" name="is_wysiwyg_enabled" padding="5" unsigned="true" nullable="false"
  1034. identity="false" default="0" comment="Is WYSIWYG Enabled"/>
  1035. <column xsi:type="smallint" name="is_used_for_promo_rules" padding="5" unsigned="true" nullable="false"
  1036. identity="false" default="0" comment="Is Used For Promo Rules"/>
  1037. <column xsi:type="smallint" name="is_required_in_admin_store" padding="5" unsigned="true" nullable="false"
  1038. identity="false" default="0" comment="Is Required In Admin Store"/>
  1039. <column xsi:type="smallint" name="is_used_in_grid" padding="5" unsigned="true" nullable="false" identity="false"
  1040. default="0" comment="Is Used in Grid"/>
  1041. <column xsi:type="smallint" name="is_visible_in_grid" padding="5" unsigned="true" nullable="false"
  1042. identity="false" default="0" comment="Is Visible in Grid"/>
  1043. <column xsi:type="smallint" name="is_filterable_in_grid" padding="5" unsigned="true" nullable="false"
  1044. identity="false" default="0" comment="Is Filterable in Grid"/>
  1045. <constraint xsi:type="primary" referenceId="PRIMARY">
  1046. <column name="attribute_id"/>
  1047. </constraint>
  1048. <constraint xsi:type="foreign" referenceId="CATALOG_EAV_ATTRIBUTE_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID"
  1049. table="catalog_eav_attribute" column="attribute_id" referenceTable="eav_attribute"
  1050. referenceColumn="attribute_id" onDelete="CASCADE"/>
  1051. <index referenceId="CATALOG_EAV_ATTRIBUTE_USED_FOR_SORT_BY" indexType="btree">
  1052. <column name="used_for_sort_by"/>
  1053. </index>
  1054. <index referenceId="CATALOG_EAV_ATTRIBUTE_USED_IN_PRODUCT_LISTING" indexType="btree">
  1055. <column name="used_in_product_listing"/>
  1056. </index>
  1057. </table>
  1058. <table name="catalog_product_relation" resource="default" engine="innodb" comment="Catalog Product Relation Table">
  1059. <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
  1060. comment="Parent ID"/>
  1061. <column xsi:type="int" name="child_id" padding="10" unsigned="true" nullable="false" identity="false"
  1062. comment="Child ID"/>
  1063. <constraint xsi:type="primary" referenceId="PRIMARY">
  1064. <column name="parent_id"/>
  1065. <column name="child_id"/>
  1066. </constraint>
  1067. <constraint xsi:type="foreign" referenceId="CAT_PRD_RELATION_CHILD_ID_CAT_PRD_ENTT_ENTT_ID"
  1068. table="catalog_product_relation" column="child_id" referenceTable="catalog_product_entity"
  1069. referenceColumn="entity_id" onDelete="CASCADE"/>
  1070. <constraint xsi:type="foreign" referenceId="CAT_PRD_RELATION_PARENT_ID_CAT_PRD_ENTT_ENTT_ID"
  1071. table="catalog_product_relation" column="parent_id" referenceTable="catalog_product_entity"
  1072. referenceColumn="entity_id" onDelete="CASCADE"/>
  1073. <index referenceId="CATALOG_PRODUCT_RELATION_CHILD_ID" indexType="btree">
  1074. <column name="child_id"/>
  1075. </index>
  1076. </table>
  1077. <table name="catalog_product_index_eav" resource="default" engine="innodb"
  1078. comment="Catalog Product EAV Index Table">
  1079. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1080. comment="Entity ID"/>
  1081. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  1082. comment="Attribute ID"/>
  1083. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  1084. comment="Store ID"/>
  1085. <column xsi:type="int" name="value" padding="10" unsigned="true" nullable="false" identity="false"
  1086. comment="Value"/>
  1087. <column xsi:type="int" name="source_id" padding="10" unsigned="true" nullable="false" identity="false"
  1088. default="0" comment="Original entity Id for attribute value"/>
  1089. <constraint xsi:type="primary" referenceId="CAT_PRD_IDX_EAV_ENTT_ID_ATTR_ID_STORE_ID_VAL_SOURCE_ID">
  1090. <column name="entity_id"/>
  1091. <column name="attribute_id"/>
  1092. <column name="store_id"/>
  1093. <column name="value"/>
  1094. <column name="source_id"/>
  1095. </constraint>
  1096. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_ATTRIBUTE_ID" indexType="btree">
  1097. <column name="attribute_id"/>
  1098. </index>
  1099. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_STORE_ID" indexType="btree">
  1100. <column name="store_id"/>
  1101. </index>
  1102. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_VALUE" indexType="btree">
  1103. <column name="value"/>
  1104. </index>
  1105. </table>
  1106. <table name="catalog_product_index_eav_decimal" resource="default" engine="innodb"
  1107. comment="Catalog Product EAV Decimal Index Table">
  1108. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1109. comment="Entity ID"/>
  1110. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  1111. comment="Attribute ID"/>
  1112. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  1113. comment="Store ID"/>
  1114. <column xsi:type="decimal" name="value" scale="4" precision="12" unsigned="false" nullable="false"
  1115. comment="Value"/>
  1116. <column xsi:type="int" name="source_id" padding="10" unsigned="true" nullable="false" identity="false"
  1117. default="0" comment="Original entity Id for attribute value"/>
  1118. <constraint xsi:type="primary" referenceId="CAT_PRD_IDX_EAV_DEC_ENTT_ID_ATTR_ID_STORE_ID_VAL_SOURCE_ID">
  1119. <column name="entity_id"/>
  1120. <column name="attribute_id"/>
  1121. <column name="store_id"/>
  1122. <column name="value"/>
  1123. <column name="source_id"/>
  1124. </constraint>
  1125. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_ATTRIBUTE_ID" indexType="btree">
  1126. <column name="attribute_id"/>
  1127. </index>
  1128. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_STORE_ID" indexType="btree">
  1129. <column name="store_id"/>
  1130. </index>
  1131. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_VALUE" indexType="btree">
  1132. <column name="value"/>
  1133. </index>
  1134. </table>
  1135. <table name="catalog_product_index_price" resource="default" engine="innodb"
  1136. comment="Catalog Product Price Index Table">
  1137. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1138. comment="Entity ID"/>
  1139. <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false"
  1140. comment="Customer Group ID"/>
  1141. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  1142. comment="Website ID"/>
  1143. <column xsi:type="smallint" name="tax_class_id" padding="5" unsigned="true" nullable="true" identity="false"
  1144. default="0" comment="Tax Class ID"/>
  1145. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
  1146. comment="Price"/>
  1147. <column xsi:type="decimal" name="final_price" scale="4" precision="12" unsigned="false" nullable="true"
  1148. comment="Final Price"/>
  1149. <column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
  1150. comment="Min Price"/>
  1151. <column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
  1152. comment="Max Price"/>
  1153. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  1154. comment="Tier Price"/>
  1155. <constraint xsi:type="primary" referenceId="PRIMARY">
  1156. <column name="entity_id"/>
  1157. <column name="customer_group_id"/>
  1158. <column name="website_id"/>
  1159. </constraint>
  1160. <index referenceId="CATALOG_PRODUCT_INDEX_PRICE_CUSTOMER_GROUP_ID" indexType="btree">
  1161. <column name="customer_group_id"/>
  1162. </index>
  1163. <index referenceId="CATALOG_PRODUCT_INDEX_PRICE_MIN_PRICE" indexType="btree">
  1164. <column name="min_price"/>
  1165. </index>
  1166. <index referenceId="CAT_PRD_IDX_PRICE_WS_ID_CSTR_GROUP_ID_MIN_PRICE" indexType="btree">
  1167. <column name="website_id"/>
  1168. <column name="customer_group_id"/>
  1169. <column name="min_price"/>
  1170. </index>
  1171. </table>
  1172. <table name="catalog_product_index_tier_price" resource="default" engine="innodb"
  1173. comment="Catalog Product Tier Price Index Table">
  1174. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1175. comment="Entity ID"/>
  1176. <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false"
  1177. comment="Customer Group ID"/>
  1178. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  1179. comment="Website ID"/>
  1180. <column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
  1181. comment="Min Price"/>
  1182. <constraint xsi:type="primary" referenceId="PRIMARY">
  1183. <column name="entity_id"/>
  1184. <column name="customer_group_id"/>
  1185. <column name="website_id"/>
  1186. </constraint>
  1187. <constraint xsi:type="foreign" referenceId="CAT_PRD_IDX_TIER_PRICE_CSTR_GROUP_ID_CSTR_GROUP_CSTR_GROUP_ID"
  1188. table="catalog_product_index_tier_price" column="customer_group_id" referenceTable="customer_group"
  1189. referenceColumn="customer_group_id" onDelete="CASCADE"/>
  1190. <constraint xsi:type="foreign" referenceId="CAT_PRD_IDX_TIER_PRICE_ENTT_ID_CAT_PRD_ENTT_ENTT_ID"
  1191. table="catalog_product_index_tier_price" column="entity_id" referenceTable="catalog_product_entity"
  1192. referenceColumn="entity_id" onDelete="CASCADE"/>
  1193. <constraint xsi:type="foreign" referenceId="CAT_PRD_IDX_TIER_PRICE_WS_ID_STORE_WS_WS_ID"
  1194. table="catalog_product_index_tier_price" column="website_id" referenceTable="store_website"
  1195. referenceColumn="website_id" onDelete="CASCADE"/>
  1196. <index referenceId="CATALOG_PRODUCT_INDEX_TIER_PRICE_CUSTOMER_GROUP_ID" indexType="btree">
  1197. <column name="customer_group_id"/>
  1198. </index>
  1199. <index referenceId="CATALOG_PRODUCT_INDEX_TIER_PRICE_WEBSITE_ID" indexType="btree">
  1200. <column name="website_id"/>
  1201. </index>
  1202. </table>
  1203. <table name="catalog_product_index_website" resource="default" engine="innodb"
  1204. comment="Catalog Product Website Index Table">
  1205. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  1206. comment="Website ID"/>
  1207. <column xsi:type="smallint" name="default_store_id" padding="5" unsigned="true" nullable="false" identity="false"
  1208. comment="Default store id for website"/>
  1209. <column xsi:type="date" name="website_date" comment="Website Date"/>
  1210. <column xsi:type="float" name="rate" unsigned="false" nullable="true" default="1" comment="Rate"/>
  1211. <constraint xsi:type="primary" referenceId="PRIMARY">
  1212. <column name="website_id"/>
  1213. </constraint>
  1214. <constraint xsi:type="foreign" referenceId="CAT_PRD_IDX_WS_WS_ID_STORE_WS_WS_ID" table="catalog_product_index_website"
  1215. column="website_id" referenceTable="store_website" referenceColumn="website_id" onDelete="CASCADE"/>
  1216. <index referenceId="CATALOG_PRODUCT_INDEX_WEBSITE_WEBSITE_DATE" indexType="btree">
  1217. <column name="website_date"/>
  1218. </index>
  1219. </table>
  1220. <table name="catalog_product_index_price_cfg_opt_agr_idx" resource="default" engine="innodb"
  1221. comment="Catalog Product Price Indexer Config Option Aggregate Index Table">
  1222. <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
  1223. comment="Parent ID"/>
  1224. <column xsi:type="int" name="child_id" padding="10" unsigned="true" nullable="false" identity="false"
  1225. comment="Child ID"/>
  1226. <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false"
  1227. default="0" comment="Customer Group ID"/>
  1228. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  1229. comment="Website ID"/>
  1230. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
  1231. comment="Price"/>
  1232. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  1233. comment="Tier Price"/>
  1234. <constraint xsi:type="primary" referenceId="PRIMARY">
  1235. <column name="parent_id"/>
  1236. <column name="child_id"/>
  1237. <column name="customer_group_id"/>
  1238. <column name="website_id"/>
  1239. </constraint>
  1240. </table>
  1241. <table name="catalog_product_index_price_cfg_opt_agr_tmp" resource="default" engine="memory"
  1242. comment="Catalog Product Price Indexer Config Option Aggregate Temp Table">
  1243. <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
  1244. comment="Parent ID"/>
  1245. <column xsi:type="int" name="child_id" padding="10" unsigned="true" nullable="false" identity="false"
  1246. comment="Child ID"/>
  1247. <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false"
  1248. default="0" comment="Customer Group ID"/>
  1249. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  1250. comment="Website ID"/>
  1251. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
  1252. comment="Price"/>
  1253. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  1254. comment="Tier Price"/>
  1255. <constraint xsi:type="primary" referenceId="PRIMARY">
  1256. <column name="parent_id"/>
  1257. <column name="child_id"/>
  1258. <column name="customer_group_id"/>
  1259. <column name="website_id"/>
  1260. </constraint>
  1261. </table>
  1262. <table name="catalog_product_index_price_cfg_opt_idx" resource="default" engine="innodb"
  1263. comment="Catalog Product Price Indexer Config Option Index Table">
  1264. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1265. comment="Entity ID"/>
  1266. <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false"
  1267. default="0" comment="Customer Group ID"/>
  1268. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  1269. comment="Website ID"/>
  1270. <column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
  1271. comment="Min Price"/>
  1272. <column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
  1273. comment="Max Price"/>
  1274. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  1275. comment="Tier Price"/>
  1276. <constraint xsi:type="primary" referenceId="PRIMARY">
  1277. <column name="entity_id"/>
  1278. <column name="customer_group_id"/>
  1279. <column name="website_id"/>
  1280. </constraint>
  1281. </table>
  1282. <table name="catalog_product_index_price_cfg_opt_tmp" resource="default" engine="memory"
  1283. comment="Catalog Product Price Indexer Config Option Temp Table">
  1284. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1285. comment="Entity ID"/>
  1286. <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false"
  1287. default="0" comment="Customer Group ID"/>
  1288. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  1289. comment="Website ID"/>
  1290. <column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
  1291. comment="Min Price"/>
  1292. <column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
  1293. comment="Max Price"/>
  1294. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  1295. comment="Tier Price"/>
  1296. <constraint xsi:type="primary" referenceId="PRIMARY">
  1297. <column name="entity_id"/>
  1298. <column name="customer_group_id"/>
  1299. <column name="website_id"/>
  1300. </constraint>
  1301. </table>
  1302. <table name="catalog_product_index_price_final_idx" resource="default" engine="innodb"
  1303. comment="Catalog Product Price Indexer Final Index Table">
  1304. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1305. comment="Entity ID"/>
  1306. <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false"
  1307. default="0" comment="Customer Group ID"/>
  1308. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  1309. comment="Website ID"/>
  1310. <column xsi:type="smallint" name="tax_class_id" padding="5" unsigned="true" nullable="true" identity="false"
  1311. default="0" comment="Tax Class ID"/>
  1312. <column xsi:type="decimal" name="orig_price" scale="4" precision="12" unsigned="false" nullable="true"
  1313. comment="Original Price"/>
  1314. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
  1315. comment="Price"/>
  1316. <column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
  1317. comment="Min Price"/>
  1318. <column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
  1319. comment="Max Price"/>
  1320. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  1321. comment="Tier Price"/>
  1322. <column xsi:type="decimal" name="base_tier" scale="4" precision="12" unsigned="false" nullable="true"
  1323. comment="Base Tier"/>
  1324. <constraint xsi:type="primary" referenceId="PRIMARY">
  1325. <column name="entity_id"/>
  1326. <column name="customer_group_id"/>
  1327. <column name="website_id"/>
  1328. </constraint>
  1329. </table>
  1330. <table name="catalog_product_index_price_final_tmp" resource="default" engine="memory"
  1331. comment="Catalog Product Price Indexer Final Temp Table">
  1332. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1333. comment="Entity ID"/>
  1334. <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false"
  1335. default="0" comment="Customer Group ID"/>
  1336. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  1337. comment="Website ID"/>
  1338. <column xsi:type="smallint" name="tax_class_id" padding="5" unsigned="true" nullable="true" identity="false"
  1339. default="0" comment="Tax Class ID"/>
  1340. <column xsi:type="decimal" name="orig_price" scale="4" precision="12" unsigned="false" nullable="true"
  1341. comment="Original Price"/>
  1342. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
  1343. comment="Price"/>
  1344. <column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
  1345. comment="Min Price"/>
  1346. <column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
  1347. comment="Max Price"/>
  1348. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  1349. comment="Tier Price"/>
  1350. <column xsi:type="decimal" name="base_tier" scale="4" precision="12" unsigned="false" nullable="true"
  1351. comment="Base Tier"/>
  1352. <constraint xsi:type="primary" referenceId="PRIMARY">
  1353. <column name="entity_id"/>
  1354. <column name="customer_group_id"/>
  1355. <column name="website_id"/>
  1356. </constraint>
  1357. </table>
  1358. <table name="catalog_product_index_price_opt_idx" resource="default" engine="innodb"
  1359. comment="Catalog Product Price Indexer Option Index Table">
  1360. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1361. comment="Entity ID"/>
  1362. <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false"
  1363. default="0" comment="Customer Group ID"/>
  1364. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  1365. comment="Website ID"/>
  1366. <column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
  1367. comment="Min Price"/>
  1368. <column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
  1369. comment="Max Price"/>
  1370. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  1371. comment="Tier Price"/>
  1372. <constraint xsi:type="primary" referenceId="PRIMARY">
  1373. <column name="entity_id"/>
  1374. <column name="customer_group_id"/>
  1375. <column name="website_id"/>
  1376. </constraint>
  1377. </table>
  1378. <table name="catalog_product_index_price_opt_tmp" resource="default" engine="memory"
  1379. comment="Catalog Product Price Indexer Option Temp Table">
  1380. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1381. comment="Entity ID"/>
  1382. <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false"
  1383. default="0" comment="Customer Group ID"/>
  1384. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  1385. comment="Website ID"/>
  1386. <column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
  1387. comment="Min Price"/>
  1388. <column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
  1389. comment="Max Price"/>
  1390. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  1391. comment="Tier Price"/>
  1392. <constraint xsi:type="primary" referenceId="PRIMARY">
  1393. <column name="entity_id"/>
  1394. <column name="customer_group_id"/>
  1395. <column name="website_id"/>
  1396. </constraint>
  1397. </table>
  1398. <table name="catalog_product_index_price_opt_agr_idx" resource="default" engine="innodb"
  1399. comment="Catalog Product Price Indexer Option Aggregate Index Table">
  1400. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1401. comment="Entity ID"/>
  1402. <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false"
  1403. default="0" comment="Customer Group ID"/>
  1404. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  1405. comment="Website ID"/>
  1406. <column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="false"
  1407. default="0" comment="Option ID"/>
  1408. <column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
  1409. comment="Min Price"/>
  1410. <column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
  1411. comment="Max Price"/>
  1412. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  1413. comment="Tier Price"/>
  1414. <constraint xsi:type="primary" referenceId="PRIMARY">
  1415. <column name="entity_id"/>
  1416. <column name="customer_group_id"/>
  1417. <column name="website_id"/>
  1418. <column name="option_id"/>
  1419. </constraint>
  1420. </table>
  1421. <table name="catalog_product_index_price_opt_agr_tmp" resource="default" engine="memory"
  1422. comment="Catalog Product Price Indexer Option Aggregate Temp Table">
  1423. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1424. comment="Entity ID"/>
  1425. <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false"
  1426. default="0" comment="Customer Group ID"/>
  1427. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  1428. comment="Website ID"/>
  1429. <column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="false"
  1430. default="0" comment="Option ID"/>
  1431. <column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
  1432. comment="Min Price"/>
  1433. <column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
  1434. comment="Max Price"/>
  1435. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  1436. comment="Tier Price"/>
  1437. <constraint xsi:type="primary" referenceId="PRIMARY">
  1438. <column name="entity_id"/>
  1439. <column name="customer_group_id"/>
  1440. <column name="website_id"/>
  1441. <column name="option_id"/>
  1442. </constraint>
  1443. </table>
  1444. <table name="catalog_product_index_eav_idx" resource="default" engine="innodb"
  1445. comment="Catalog Product EAV Indexer Index Table">
  1446. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1447. comment="Entity ID"/>
  1448. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  1449. comment="Attribute ID"/>
  1450. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  1451. comment="Store ID"/>
  1452. <column xsi:type="int" name="value" padding="10" unsigned="true" nullable="false" identity="false"
  1453. comment="Value"/>
  1454. <column xsi:type="int" name="source_id" padding="10" unsigned="true" nullable="false" identity="false"
  1455. default="0" comment="Original entity Id for attribute value"/>
  1456. <constraint xsi:type="primary" referenceId="CAT_PRD_IDX_EAV_IDX_ENTT_ID_ATTR_ID_STORE_ID_VAL_SOURCE_ID">
  1457. <column name="entity_id"/>
  1458. <column name="attribute_id"/>
  1459. <column name="store_id"/>
  1460. <column name="value"/>
  1461. <column name="source_id"/>
  1462. </constraint>
  1463. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_IDX_ATTRIBUTE_ID" indexType="btree">
  1464. <column name="attribute_id"/>
  1465. </index>
  1466. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_IDX_STORE_ID" indexType="btree">
  1467. <column name="store_id"/>
  1468. </index>
  1469. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_IDX_VALUE" indexType="btree">
  1470. <column name="value"/>
  1471. </index>
  1472. </table>
  1473. <table name="catalog_product_index_eav_tmp" resource="default" engine="memory"
  1474. comment="Catalog Product EAV Indexer Temp Table">
  1475. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1476. comment="Entity ID"/>
  1477. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  1478. comment="Attribute ID"/>
  1479. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  1480. comment="Store ID"/>
  1481. <column xsi:type="int" name="value" padding="10" unsigned="true" nullable="false" identity="false"
  1482. comment="Value"/>
  1483. <column xsi:type="int" name="source_id" padding="10" unsigned="true" nullable="false" identity="false"
  1484. default="0" comment="Original entity Id for attribute value"/>
  1485. <constraint xsi:type="primary" referenceId="CAT_PRD_IDX_EAV_TMP_ENTT_ID_ATTR_ID_STORE_ID_VAL_SOURCE_ID">
  1486. <column name="entity_id"/>
  1487. <column name="attribute_id"/>
  1488. <column name="store_id"/>
  1489. <column name="value"/>
  1490. <column name="source_id"/>
  1491. </constraint>
  1492. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_ATTRIBUTE_ID" indexType="hash">
  1493. <column name="attribute_id"/>
  1494. </index>
  1495. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_STORE_ID" indexType="hash">
  1496. <column name="store_id"/>
  1497. </index>
  1498. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_VALUE" indexType="hash">
  1499. <column name="value"/>
  1500. </index>
  1501. </table>
  1502. <table name="catalog_product_index_eav_decimal_idx" resource="default" engine="innodb"
  1503. comment="Catalog Product EAV Decimal Indexer Index Table">
  1504. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1505. comment="Entity ID"/>
  1506. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  1507. comment="Attribute ID"/>
  1508. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  1509. comment="Store ID"/>
  1510. <column xsi:type="decimal" name="value" scale="4" precision="12" unsigned="false" nullable="false"
  1511. comment="Value"/>
  1512. <column xsi:type="int" name="source_id" padding="10" unsigned="true" nullable="false" identity="false"
  1513. default="0" comment="Original entity Id for attribute value"/>
  1514. <constraint xsi:type="primary" referenceId="CAT_PRD_IDX_EAV_DEC_IDX_ENTT_ID_ATTR_ID_STORE_ID_VAL_SOURCE_ID">
  1515. <column name="entity_id"/>
  1516. <column name="attribute_id"/>
  1517. <column name="store_id"/>
  1518. <column name="value"/>
  1519. <column name="source_id"/>
  1520. </constraint>
  1521. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_IDX_ATTRIBUTE_ID" indexType="btree">
  1522. <column name="attribute_id"/>
  1523. </index>
  1524. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_IDX_STORE_ID" indexType="btree">
  1525. <column name="store_id"/>
  1526. </index>
  1527. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_IDX_VALUE" indexType="btree">
  1528. <column name="value"/>
  1529. </index>
  1530. </table>
  1531. <table name="catalog_product_index_eav_decimal_tmp" resource="default" engine="memory"
  1532. comment="Catalog Product EAV Decimal Indexer Temp Table">
  1533. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1534. comment="Entity ID"/>
  1535. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  1536. comment="Attribute ID"/>
  1537. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  1538. comment="Store ID"/>
  1539. <column xsi:type="decimal" name="value" scale="4" precision="12" unsigned="false" nullable="false"
  1540. comment="Value"/>
  1541. <column xsi:type="int" name="source_id" padding="10" unsigned="true" nullable="false" identity="false"
  1542. default="0" comment="Original entity Id for attribute value"/>
  1543. <constraint xsi:type="primary" referenceId="CAT_PRD_IDX_EAV_DEC_TMP_ENTT_ID_ATTR_ID_STORE_ID_VAL_SOURCE_ID">
  1544. <column name="entity_id"/>
  1545. <column name="attribute_id"/>
  1546. <column name="store_id"/>
  1547. <column name="value"/>
  1548. <column name="source_id"/>
  1549. </constraint>
  1550. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_ATTRIBUTE_ID" indexType="hash">
  1551. <column name="attribute_id"/>
  1552. </index>
  1553. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_STORE_ID" indexType="hash">
  1554. <column name="store_id"/>
  1555. </index>
  1556. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_VALUE" indexType="hash">
  1557. <column name="value"/>
  1558. </index>
  1559. </table>
  1560. <table name="catalog_product_index_price_idx" resource="default" engine="innodb"
  1561. comment="Catalog Product Price Indexer Index Table">
  1562. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1563. comment="Entity ID"/>
  1564. <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false"
  1565. default="0" comment="Customer Group ID"/>
  1566. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  1567. comment="Website ID"/>
  1568. <column xsi:type="smallint" name="tax_class_id" padding="5" unsigned="true" nullable="true" identity="false"
  1569. default="0" comment="Tax Class ID"/>
  1570. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
  1571. comment="Price"/>
  1572. <column xsi:type="decimal" name="final_price" scale="4" precision="12" unsigned="false" nullable="true"
  1573. comment="Final Price"/>
  1574. <column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
  1575. comment="Min Price"/>
  1576. <column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
  1577. comment="Max Price"/>
  1578. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  1579. comment="Tier Price"/>
  1580. <constraint xsi:type="primary" referenceId="PRIMARY">
  1581. <column name="entity_id"/>
  1582. <column name="customer_group_id"/>
  1583. <column name="website_id"/>
  1584. </constraint>
  1585. <index referenceId="CATALOG_PRODUCT_INDEX_PRICE_IDX_CUSTOMER_GROUP_ID" indexType="btree">
  1586. <column name="customer_group_id"/>
  1587. </index>
  1588. <index referenceId="CATALOG_PRODUCT_INDEX_PRICE_IDX_WEBSITE_ID" indexType="btree">
  1589. <column name="website_id"/>
  1590. </index>
  1591. <index referenceId="CATALOG_PRODUCT_INDEX_PRICE_IDX_MIN_PRICE" indexType="btree">
  1592. <column name="min_price"/>
  1593. </index>
  1594. </table>
  1595. <table name="catalog_product_index_price_tmp" resource="default" engine="memory"
  1596. comment="Catalog Product Price Indexer Temp Table">
  1597. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1598. comment="Entity ID"/>
  1599. <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false"
  1600. default="0" comment="Customer Group ID"/>
  1601. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  1602. comment="Website ID"/>
  1603. <column xsi:type="smallint" name="tax_class_id" padding="5" unsigned="true" nullable="true" identity="false"
  1604. default="0" comment="Tax Class ID"/>
  1605. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
  1606. comment="Price"/>
  1607. <column xsi:type="decimal" name="final_price" scale="4" precision="12" unsigned="false" nullable="true"
  1608. comment="Final Price"/>
  1609. <column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
  1610. comment="Min Price"/>
  1611. <column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
  1612. comment="Max Price"/>
  1613. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  1614. comment="Tier Price"/>
  1615. <constraint xsi:type="primary" referenceId="PRIMARY">
  1616. <column name="entity_id"/>
  1617. <column name="customer_group_id"/>
  1618. <column name="website_id"/>
  1619. </constraint>
  1620. <index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_CUSTOMER_GROUP_ID" indexType="hash">
  1621. <column name="customer_group_id"/>
  1622. </index>
  1623. <index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_WEBSITE_ID" indexType="hash">
  1624. <column name="website_id"/>
  1625. </index>
  1626. <index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_MIN_PRICE" indexType="hash">
  1627. <column name="min_price"/>
  1628. </index>
  1629. </table>
  1630. <table name="catalog_category_product_index_tmp" resource="default" engine="memory"
  1631. comment="Catalog Category Product Indexer temporary table">
  1632. <column xsi:type="int" name="category_id" padding="10" unsigned="true" nullable="false" identity="false"
  1633. default="0" comment="Category ID"/>
  1634. <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
  1635. default="0" comment="Product ID"/>
  1636. <column xsi:type="int" name="position" padding="11" unsigned="false" nullable="false" identity="false"
  1637. default="0" comment="Position"/>
  1638. <column xsi:type="smallint" name="is_parent" padding="5" unsigned="true" nullable="false" identity="false"
  1639. default="0" comment="Is Parent"/>
  1640. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  1641. default="0" comment="Store ID"/>
  1642. <column xsi:type="smallint" name="visibility" padding="5" unsigned="true" nullable="false" identity="false"
  1643. comment="Visibility"/>
  1644. <constraint xsi:type="primary" referenceId="PRIMARY">
  1645. <column name="category_id"/>
  1646. <column name="product_id"/>
  1647. <column name="store_id"/>
  1648. </constraint>
  1649. <index referenceId="CAT_CTGR_PRD_IDX_TMP_PRD_ID_CTGR_ID_STORE_ID" indexType="hash">
  1650. <column name="product_id"/>
  1651. <column name="category_id"/>
  1652. <column name="store_id"/>
  1653. </index>
  1654. </table>
  1655. <table name="catalog_product_entity_media_gallery_value_to_entity" resource="default" engine="innodb"
  1656. comment="Link Media value to Product entity table">
  1657. <column xsi:type="int" name="value_id" padding="10" unsigned="true" nullable="false" identity="false"
  1658. comment="Value media Entry ID"/>
  1659. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1660. comment="Product Entity ID"/>
  1661. <constraint xsi:type="foreign" referenceId="FK_A6C6C8FAA386736921D3A7C4B50B1185"
  1662. table="catalog_product_entity_media_gallery_value_to_entity" column="value_id"
  1663. referenceTable="catalog_product_entity_media_gallery" referenceColumn="value_id"
  1664. onDelete="CASCADE"/>
  1665. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_MDA_GLR_VAL_TO_ENTT_ENTT_ID_CAT_PRD_ENTT_ENTT_ID"
  1666. table="catalog_product_entity_media_gallery_value_to_entity" column="entity_id"
  1667. referenceTable="catalog_product_entity" referenceColumn="entity_id" onDelete="CASCADE"/>
  1668. <constraint xsi:type="unique" referenceId="CAT_PRD_ENTT_MDA_GLR_VAL_TO_ENTT_VAL_ID_ENTT_ID">
  1669. <column name="value_id"/>
  1670. <column name="entity_id"/>
  1671. </constraint>
  1672. </table>
  1673. <table name="catalog_product_index_eav_replica" resource="default" engine="innodb"
  1674. comment="Catalog Product EAV Index Table">
  1675. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1676. comment="Entity ID"/>
  1677. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  1678. comment="Attribute ID"/>
  1679. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  1680. comment="Store ID"/>
  1681. <column xsi:type="int" name="value" padding="10" unsigned="true" nullable="false" identity="false"
  1682. comment="Value"/>
  1683. <column xsi:type="int" name="source_id" padding="10" unsigned="true" nullable="false" identity="false"
  1684. default="0" comment="Original entity Id for attribute value"/>
  1685. <constraint xsi:type="primary" referenceId="PRIMARY">
  1686. <column name="entity_id"/>
  1687. <column name="attribute_id"/>
  1688. <column name="store_id"/>
  1689. <column name="value"/>
  1690. <column name="source_id"/>
  1691. </constraint>
  1692. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_ATTRIBUTE_ID" indexType="btree">
  1693. <column name="attribute_id"/>
  1694. </index>
  1695. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_STORE_ID" indexType="btree">
  1696. <column name="store_id"/>
  1697. </index>
  1698. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_VALUE" indexType="btree">
  1699. <column name="value"/>
  1700. </index>
  1701. </table>
  1702. <table name="catalog_product_index_eav_decimal_replica" resource="default" engine="innodb"
  1703. comment="Catalog Product EAV Decimal Index Table">
  1704. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1705. comment="Entity ID"/>
  1706. <column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
  1707. comment="Attribute ID"/>
  1708. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  1709. comment="Store ID"/>
  1710. <column xsi:type="decimal" name="value" scale="4" precision="12" unsigned="false" nullable="false"
  1711. comment="Value"/>
  1712. <column xsi:type="int" name="source_id" padding="10" unsigned="true" nullable="false" identity="false"
  1713. default="0" comment="Original entity Id for attribute value"/>
  1714. <constraint xsi:type="primary" referenceId="PRIMARY">
  1715. <column name="entity_id"/>
  1716. <column name="attribute_id"/>
  1717. <column name="store_id"/>
  1718. <column name="value"/>
  1719. <column name="source_id"/>
  1720. </constraint>
  1721. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_ATTRIBUTE_ID" indexType="btree">
  1722. <column name="attribute_id"/>
  1723. </index>
  1724. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_STORE_ID" indexType="btree">
  1725. <column name="store_id"/>
  1726. </index>
  1727. <index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_VALUE" indexType="btree">
  1728. <column name="value"/>
  1729. </index>
  1730. </table>
  1731. <table name="catalog_product_index_price_replica" resource="default" engine="innodb"
  1732. comment="Catalog Product Price Index Table">
  1733. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1734. comment="Entity ID"/>
  1735. <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false"
  1736. comment="Customer Group ID"/>
  1737. <column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
  1738. comment="Website ID"/>
  1739. <column xsi:type="smallint" name="tax_class_id" padding="5" unsigned="true" nullable="true" identity="false"
  1740. default="0" comment="Tax Class ID"/>
  1741. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
  1742. comment="Price"/>
  1743. <column xsi:type="decimal" name="final_price" scale="4" precision="12" unsigned="false" nullable="true"
  1744. comment="Final Price"/>
  1745. <column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
  1746. comment="Min Price"/>
  1747. <column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
  1748. comment="Max Price"/>
  1749. <column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
  1750. comment="Tier Price"/>
  1751. <constraint xsi:type="primary" referenceId="PRIMARY">
  1752. <column name="entity_id"/>
  1753. <column name="customer_group_id"/>
  1754. <column name="website_id"/>
  1755. </constraint>
  1756. <index referenceId="CATALOG_PRODUCT_INDEX_PRICE_CUSTOMER_GROUP_ID" indexType="btree">
  1757. <column name="customer_group_id"/>
  1758. </index>
  1759. <index referenceId="CATALOG_PRODUCT_INDEX_PRICE_MIN_PRICE" indexType="btree">
  1760. <column name="min_price"/>
  1761. </index>
  1762. <index referenceId="CAT_PRD_IDX_PRICE_WS_ID_CSTR_GROUP_ID_MIN_PRICE" indexType="btree">
  1763. <column name="website_id"/>
  1764. <column name="customer_group_id"/>
  1765. <column name="min_price"/>
  1766. </index>
  1767. </table>
  1768. <table name="catalog_category_product_index_replica" resource="default" engine="innodb"
  1769. comment="Catalog Category Product Index">
  1770. <column xsi:type="int" name="category_id" padding="10" unsigned="true" nullable="false" identity="false"
  1771. default="0" comment="Category ID"/>
  1772. <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
  1773. default="0" comment="Product ID"/>
  1774. <column xsi:type="int" name="position" padding="11" unsigned="false" nullable="true" identity="false"
  1775. comment="Position"/>
  1776. <column xsi:type="smallint" name="is_parent" padding="5" unsigned="true" nullable="false" identity="false"
  1777. default="0" comment="Is Parent"/>
  1778. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  1779. default="0" comment="Store ID"/>
  1780. <column xsi:type="smallint" name="visibility" padding="5" unsigned="true" nullable="false" identity="false"
  1781. comment="Visibility"/>
  1782. <constraint xsi:type="primary" referenceId="PRIMARY">
  1783. <column name="category_id"/>
  1784. <column name="product_id"/>
  1785. <column name="store_id"/>
  1786. </constraint>
  1787. <index referenceId="CAT_CTGR_PRD_IDX_PRD_ID_STORE_ID_CTGR_ID_VISIBILITY" indexType="btree">
  1788. <column name="product_id"/>
  1789. <column name="store_id"/>
  1790. <column name="category_id"/>
  1791. <column name="visibility"/>
  1792. </index>
  1793. <index referenceId="CAT_CTGR_PRD_IDX_STORE_ID_CTGR_ID_VISIBILITY_IS_PARENT_POSITION" indexType="btree">
  1794. <column name="store_id"/>
  1795. <column name="category_id"/>
  1796. <column name="visibility"/>
  1797. <column name="is_parent"/>
  1798. <column name="position"/>
  1799. </index>
  1800. </table>
  1801. <table name="catalog_product_frontend_action" resource="default" engine="innodb"
  1802. comment="Catalog Product Frontend Action Table">
  1803. <column xsi:type="bigint" name="action_id" padding="20" unsigned="true" nullable="false" identity="true"
  1804. comment="Product Action Id"/>
  1805. <column xsi:type="varchar" name="type_id" nullable="false" length="64" comment="Type of product action"/>
  1806. <column xsi:type="int" name="visitor_id" padding="10" unsigned="true" nullable="true" identity="false"
  1807. comment="Visitor Id"/>
  1808. <column xsi:type="int" name="customer_id" padding="10" unsigned="true" nullable="true" identity="false"
  1809. comment="Customer Id"/>
  1810. <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
  1811. comment="Product Id"/>
  1812. <column xsi:type="bigint" name="added_at" padding="20" unsigned="false" nullable="false" identity="false"
  1813. comment="Added At"/>
  1814. <constraint xsi:type="primary" referenceId="PRIMARY">
  1815. <column name="action_id"/>
  1816. </constraint>
  1817. <constraint xsi:type="foreign" referenceId="CAT_PRD_FRONTEND_ACTION_CSTR_ID_CSTR_ENTT_ENTT_ID"
  1818. table="catalog_product_frontend_action" column="customer_id" referenceTable="customer_entity"
  1819. referenceColumn="entity_id" onDelete="CASCADE"/>
  1820. <constraint xsi:type="foreign" referenceId="CAT_PRD_FRONTEND_ACTION_PRD_ID_CAT_PRD_ENTT_ENTT_ID"
  1821. table="catalog_product_frontend_action" column="product_id" referenceTable="catalog_product_entity"
  1822. referenceColumn="entity_id" onDelete="CASCADE" />
  1823. <constraint xsi:type="unique" referenceId="CATALOG_PRODUCT_FRONTEND_ACTION_VISITOR_ID_PRODUCT_ID_TYPE_ID">
  1824. <column name="visitor_id"/>
  1825. <column name="product_id"/>
  1826. <column name="type_id"/>
  1827. </constraint>
  1828. <constraint xsi:type="unique" referenceId="CATALOG_PRODUCT_FRONTEND_ACTION_CUSTOMER_ID_PRODUCT_ID_TYPE_ID">
  1829. <column name="customer_id"/>
  1830. <column name="product_id"/>
  1831. <column name="type_id"/>
  1832. </constraint>
  1833. </table>
  1834. </schema>