25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

612 lines
40 KiB

  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="eav_entity_type" resource="default" engine="innodb" comment="Eav Entity Type">
  11. <column xsi:type="smallint" name="entity_type_id" unsigned="true" nullable="false" identity="true"
  12. comment="Entity Type ID"/>
  13. <column xsi:type="varchar" name="entity_type_code" nullable="false" length="50" comment="Entity Type Code"/>
  14. <column xsi:type="varchar" name="entity_model" nullable="false" length="255" comment="Entity Model"/>
  15. <column xsi:type="varchar" name="attribute_model" nullable="true" length="255" comment="Attribute Model"/>
  16. <column xsi:type="varchar" name="entity_table" nullable="true" length="255" comment="Entity Table"/>
  17. <column xsi:type="varchar" name="value_table_prefix" nullable="true" length="255" comment="Value Table Prefix"/>
  18. <column xsi:type="varchar" name="entity_id_field" nullable="true" length="255" comment="Entity ID Field"/>
  19. <column xsi:type="smallint" name="is_data_sharing" unsigned="true" nullable="false" identity="false"
  20. default="1" comment="Defines Is Data Sharing"/>
  21. <column xsi:type="varchar" name="data_sharing_key" nullable="true" length="100" default="default"
  22. comment="Data Sharing Key"/>
  23. <column xsi:type="smallint" name="default_attribute_set_id" unsigned="true" nullable="false"
  24. identity="false" default="0" comment="Default Attribute Set ID"/>
  25. <column xsi:type="varchar" name="increment_model" nullable="true" length="255" comment="Increment Model"/>
  26. <column xsi:type="smallint" name="increment_per_store" unsigned="true" nullable="false"
  27. identity="false" default="0" comment="Increment Per Store"/>
  28. <column xsi:type="smallint" name="increment_pad_length" unsigned="true" nullable="false"
  29. identity="false" default="8" comment="Increment Pad Length"/>
  30. <column xsi:type="varchar" name="increment_pad_char" nullable="false" length="1" default="0"
  31. comment="Increment Pad Char"/>
  32. <column xsi:type="varchar" name="additional_attribute_table" nullable="true" length="255"
  33. comment="Additional Attribute Table"/>
  34. <column xsi:type="varchar" name="entity_attribute_collection" nullable="true" length="255"
  35. comment="Entity Attribute Collection"/>
  36. <constraint xsi:type="primary" referenceId="PRIMARY">
  37. <column name="entity_type_id"/>
  38. </constraint>
  39. <index referenceId="EAV_ENTITY_TYPE_ENTITY_TYPE_CODE" indexType="btree">
  40. <column name="entity_type_code"/>
  41. </index>
  42. </table>
  43. <table name="eav_entity" resource="default" engine="innodb" comment="Eav Entity">
  44. <column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="true"
  45. comment="Entity ID"/>
  46. <column xsi:type="smallint" name="entity_type_id" unsigned="true" nullable="false" identity="false"
  47. default="0" comment="Entity Type ID"/>
  48. <column xsi:type="smallint" name="attribute_set_id" unsigned="true" nullable="false"
  49. identity="false" default="0" comment="Attribute Set ID"/>
  50. <column xsi:type="varchar" name="increment_id" nullable="true" length="50" comment="Increment ID"/>
  51. <column xsi:type="int" name="parent_id" unsigned="true" nullable="false" identity="false"
  52. default="0" comment="Parent ID"/>
  53. <column xsi:type="smallint" name="store_id" unsigned="true" nullable="false" identity="false"
  54. default="0" comment="Store ID"/>
  55. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  56. comment="Created At"/>
  57. <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
  58. comment="Updated At"/>
  59. <column xsi:type="smallint" name="is_active" unsigned="true" nullable="false" identity="false"
  60. default="1" comment="Defines Is Entity Active"/>
  61. <constraint xsi:type="primary" referenceId="PRIMARY">
  62. <column name="entity_id"/>
  63. </constraint>
  64. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID"
  65. table="eav_entity" column="entity_type_id" referenceTable="eav_entity_type"
  66. referenceColumn="entity_type_id" onDelete="CASCADE"/>
  67. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_STORE_ID_STORE_STORE_ID" table="eav_entity" column="store_id"
  68. referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
  69. <index referenceId="EAV_ENTITY_ENTITY_TYPE_ID" indexType="btree">
  70. <column name="entity_type_id"/>
  71. </index>
  72. <index referenceId="EAV_ENTITY_STORE_ID" indexType="btree">
  73. <column name="store_id"/>
  74. </index>
  75. </table>
  76. <table name="eav_entity_datetime" resource="default" engine="innodb" comment="Eav Entity Value Prefix">
  77. <column xsi:type="int" name="value_id" unsigned="false" nullable="false" identity="true"
  78. comment="Value ID"/>
  79. <column xsi:type="smallint" name="entity_type_id" unsigned="true" nullable="false" identity="false"
  80. default="0" comment="Entity Type ID"/>
  81. <column xsi:type="smallint" name="attribute_id" unsigned="true" nullable="false" identity="false"
  82. default="0" comment="Attribute ID"/>
  83. <column xsi:type="smallint" name="store_id" unsigned="true" nullable="false" identity="false"
  84. default="0" comment="Store ID"/>
  85. <column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="false"
  86. default="0" comment="Entity ID"/>
  87. <column xsi:type="datetime" name="value" on_update="false" nullable="true" comment="Attribute Value"/>
  88. <constraint xsi:type="primary" referenceId="PRIMARY">
  89. <column name="value_id"/>
  90. </constraint>
  91. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_DATETIME_ENTITY_ID_EAV_ENTITY_ENTITY_ID"
  92. table="eav_entity_datetime" column="entity_id" referenceTable="eav_entity"
  93. referenceColumn="entity_id" onDelete="CASCADE"/>
  94. <constraint xsi:type="foreign" referenceId="EAV_ENTT_DTIME_ENTT_TYPE_ID_EAV_ENTT_TYPE_ENTT_TYPE_ID"
  95. table="eav_entity_datetime" column="entity_type_id" referenceTable="eav_entity_type"
  96. referenceColumn="entity_type_id" onDelete="CASCADE"/>
  97. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_DATETIME_STORE_ID_STORE_STORE_ID" table="eav_entity_datetime"
  98. column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
  99. <constraint xsi:type="unique" referenceId="EAV_ENTITY_DATETIME_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
  100. <column name="entity_id"/>
  101. <column name="attribute_id"/>
  102. <column name="store_id"/>
  103. </constraint>
  104. <index referenceId="EAV_ENTITY_DATETIME_STORE_ID" indexType="btree">
  105. <column name="store_id"/>
  106. </index>
  107. <index referenceId="EAV_ENTITY_DATETIME_ATTRIBUTE_ID_VALUE" indexType="btree">
  108. <column name="attribute_id"/>
  109. <column name="value"/>
  110. </index>
  111. <index referenceId="EAV_ENTITY_DATETIME_ENTITY_TYPE_ID_VALUE" indexType="btree">
  112. <column name="entity_type_id"/>
  113. <column name="value"/>
  114. </index>
  115. </table>
  116. <table name="eav_entity_decimal" resource="default" engine="innodb" comment="Eav Entity Value Prefix">
  117. <column xsi:type="int" name="value_id" unsigned="false" nullable="false" identity="true"
  118. comment="Value ID"/>
  119. <column xsi:type="smallint" name="entity_type_id" unsigned="true" nullable="false" identity="false"
  120. default="0" comment="Entity Type ID"/>
  121. <column xsi:type="smallint" name="attribute_id" unsigned="true" nullable="false" identity="false"
  122. default="0" comment="Attribute ID"/>
  123. <column xsi:type="smallint" name="store_id" unsigned="true" nullable="false" identity="false"
  124. default="0" comment="Store ID"/>
  125. <column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="false"
  126. default="0" comment="Entity ID"/>
  127. <column xsi:type="decimal" name="value" scale="4" precision="12" unsigned="false" nullable="false" default="0"
  128. comment="Attribute Value"/>
  129. <constraint xsi:type="primary" referenceId="PRIMARY">
  130. <column name="value_id"/>
  131. </constraint>
  132. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_DECIMAL_ENTITY_ID_EAV_ENTITY_ENTITY_ID"
  133. table="eav_entity_decimal" column="entity_id" referenceTable="eav_entity"
  134. referenceColumn="entity_id" onDelete="CASCADE"/>
  135. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_DECIMAL_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID"
  136. table="eav_entity_decimal" column="entity_type_id" referenceTable="eav_entity_type"
  137. referenceColumn="entity_type_id" onDelete="CASCADE"/>
  138. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_DECIMAL_STORE_ID_STORE_STORE_ID" table="eav_entity_decimal"
  139. column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
  140. <constraint xsi:type="unique" referenceId="EAV_ENTITY_DECIMAL_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
  141. <column name="entity_id"/>
  142. <column name="attribute_id"/>
  143. <column name="store_id"/>
  144. </constraint>
  145. <index referenceId="EAV_ENTITY_DECIMAL_STORE_ID" indexType="btree">
  146. <column name="store_id"/>
  147. </index>
  148. <index referenceId="EAV_ENTITY_DECIMAL_ATTRIBUTE_ID_VALUE" indexType="btree">
  149. <column name="attribute_id"/>
  150. <column name="value"/>
  151. </index>
  152. <index referenceId="EAV_ENTITY_DECIMAL_ENTITY_TYPE_ID_VALUE" indexType="btree">
  153. <column name="entity_type_id"/>
  154. <column name="value"/>
  155. </index>
  156. </table>
  157. <table name="eav_entity_int" resource="default" engine="innodb" comment="Eav Entity Value Prefix">
  158. <column xsi:type="int" name="value_id" unsigned="false" nullable="false" identity="true"
  159. comment="Value ID"/>
  160. <column xsi:type="smallint" name="entity_type_id" unsigned="true" nullable="false" identity="false"
  161. default="0" comment="Entity Type ID"/>
  162. <column xsi:type="smallint" name="attribute_id" unsigned="true" nullable="false" identity="false"
  163. default="0" comment="Attribute ID"/>
  164. <column xsi:type="smallint" name="store_id" unsigned="true" nullable="false" identity="false"
  165. default="0" comment="Store ID"/>
  166. <column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="false"
  167. default="0" comment="Entity ID"/>
  168. <column xsi:type="int" name="value" unsigned="false" nullable="false" identity="false" default="0"
  169. comment="Attribute Value"/>
  170. <constraint xsi:type="primary" referenceId="PRIMARY">
  171. <column name="value_id"/>
  172. </constraint>
  173. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_INT_ENTITY_ID_EAV_ENTITY_ENTITY_ID" table="eav_entity_int"
  174. column="entity_id" referenceTable="eav_entity" referenceColumn="entity_id" onDelete="CASCADE"/>
  175. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_INT_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID"
  176. table="eav_entity_int" column="entity_type_id" referenceTable="eav_entity_type"
  177. referenceColumn="entity_type_id" onDelete="CASCADE"/>
  178. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_INT_STORE_ID_STORE_STORE_ID" table="eav_entity_int"
  179. column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
  180. <constraint xsi:type="unique" referenceId="EAV_ENTITY_INT_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
  181. <column name="entity_id"/>
  182. <column name="attribute_id"/>
  183. <column name="store_id"/>
  184. </constraint>
  185. <index referenceId="EAV_ENTITY_INT_STORE_ID" indexType="btree">
  186. <column name="store_id"/>
  187. </index>
  188. <index referenceId="EAV_ENTITY_INT_ATTRIBUTE_ID_VALUE" indexType="btree">
  189. <column name="attribute_id"/>
  190. <column name="value"/>
  191. </index>
  192. <index referenceId="EAV_ENTITY_INT_ENTITY_TYPE_ID_VALUE" indexType="btree">
  193. <column name="entity_type_id"/>
  194. <column name="value"/>
  195. </index>
  196. </table>
  197. <table name="eav_entity_text" resource="default" engine="innodb" comment="Eav Entity Value Prefix">
  198. <column xsi:type="int" name="value_id" unsigned="false" nullable="false" identity="true"
  199. comment="Value ID"/>
  200. <column xsi:type="smallint" name="entity_type_id" unsigned="true" nullable="false" identity="false"
  201. default="0" comment="Entity Type ID"/>
  202. <column xsi:type="smallint" name="attribute_id" unsigned="true" nullable="false" identity="false"
  203. default="0" comment="Attribute ID"/>
  204. <column xsi:type="smallint" name="store_id" unsigned="true" nullable="false" identity="false"
  205. default="0" comment="Store ID"/>
  206. <column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="false"
  207. default="0" comment="Entity ID"/>
  208. <column xsi:type="text" name="value" nullable="false" comment="Attribute Value"/>
  209. <constraint xsi:type="primary" referenceId="PRIMARY">
  210. <column name="value_id"/>
  211. </constraint>
  212. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_TEXT_ENTITY_ID_EAV_ENTITY_ENTITY_ID" table="eav_entity_text"
  213. column="entity_id" referenceTable="eav_entity" referenceColumn="entity_id" onDelete="CASCADE"/>
  214. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_TEXT_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID"
  215. table="eav_entity_text" column="entity_type_id" referenceTable="eav_entity_type"
  216. referenceColumn="entity_type_id" onDelete="CASCADE"/>
  217. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_TEXT_STORE_ID_STORE_STORE_ID" table="eav_entity_text"
  218. column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
  219. <constraint xsi:type="unique" referenceId="EAV_ENTITY_TEXT_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
  220. <column name="entity_id"/>
  221. <column name="attribute_id"/>
  222. <column name="store_id"/>
  223. </constraint>
  224. <index referenceId="EAV_ENTITY_TEXT_ENTITY_TYPE_ID" indexType="btree">
  225. <column name="entity_type_id"/>
  226. </index>
  227. <index referenceId="EAV_ENTITY_TEXT_ATTRIBUTE_ID" indexType="btree">
  228. <column name="attribute_id"/>
  229. </index>
  230. <index referenceId="EAV_ENTITY_TEXT_STORE_ID" indexType="btree">
  231. <column name="store_id"/>
  232. </index>
  233. </table>
  234. <table name="eav_entity_varchar" resource="default" engine="innodb" comment="Eav Entity Value Prefix">
  235. <column xsi:type="int" name="value_id" unsigned="false" nullable="false" identity="true"
  236. comment="Value ID"/>
  237. <column xsi:type="smallint" name="entity_type_id" unsigned="true" nullable="false" identity="false"
  238. default="0" comment="Entity Type ID"/>
  239. <column xsi:type="smallint" name="attribute_id" unsigned="true" nullable="false" identity="false"
  240. default="0" comment="Attribute ID"/>
  241. <column xsi:type="smallint" name="store_id" unsigned="true" nullable="false" identity="false"
  242. default="0" comment="Store ID"/>
  243. <column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="false"
  244. default="0" comment="Entity ID"/>
  245. <column xsi:type="varchar" name="value" nullable="true" length="255" comment="Attribute Value"/>
  246. <constraint xsi:type="primary" referenceId="PRIMARY">
  247. <column name="value_id"/>
  248. </constraint>
  249. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_VARCHAR_ENTITY_ID_EAV_ENTITY_ENTITY_ID"
  250. table="eav_entity_varchar" column="entity_id" referenceTable="eav_entity"
  251. referenceColumn="entity_id" onDelete="CASCADE"/>
  252. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_VARCHAR_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID"
  253. table="eav_entity_varchar" column="entity_type_id" referenceTable="eav_entity_type"
  254. referenceColumn="entity_type_id" onDelete="CASCADE"/>
  255. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_VARCHAR_STORE_ID_STORE_STORE_ID" table="eav_entity_varchar"
  256. column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
  257. <constraint xsi:type="unique" referenceId="EAV_ENTITY_VARCHAR_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
  258. <column name="entity_id"/>
  259. <column name="attribute_id"/>
  260. <column name="store_id"/>
  261. </constraint>
  262. <index referenceId="EAV_ENTITY_VARCHAR_STORE_ID" indexType="btree">
  263. <column name="store_id"/>
  264. </index>
  265. <index referenceId="EAV_ENTITY_VARCHAR_ATTRIBUTE_ID_VALUE" indexType="btree">
  266. <column name="attribute_id"/>
  267. <column name="value"/>
  268. </index>
  269. <index referenceId="EAV_ENTITY_VARCHAR_ENTITY_TYPE_ID_VALUE" indexType="btree">
  270. <column name="entity_type_id"/>
  271. <column name="value"/>
  272. </index>
  273. </table>
  274. <table name="eav_attribute" resource="default" engine="innodb" comment="Eav Attribute">
  275. <column xsi:type="smallint" name="attribute_id" unsigned="true" nullable="false" identity="true"
  276. comment="Attribute ID"/>
  277. <column xsi:type="smallint" name="entity_type_id" unsigned="true" nullable="false" identity="false"
  278. default="0" comment="Entity Type ID"/>
  279. <column xsi:type="varchar" name="attribute_code" nullable="false" length="255" comment="Attribute Code"/>
  280. <column xsi:type="varchar" name="attribute_model" nullable="true" length="255" comment="Attribute Model"/>
  281. <column xsi:type="varchar" name="backend_model" nullable="true" length="255" comment="Backend Model"/>
  282. <column xsi:type="varchar" name="backend_type" nullable="false" length="8" default="static"
  283. comment="Backend Type"/>
  284. <column xsi:type="varchar" name="backend_table" nullable="true" length="255" comment="Backend Table"/>
  285. <column xsi:type="varchar" name="frontend_model" nullable="true" length="255" comment="Frontend Model"/>
  286. <column xsi:type="varchar" name="frontend_input" nullable="true" length="50" comment="Frontend Input"/>
  287. <column xsi:type="varchar" name="frontend_label" nullable="true" length="255" comment="Frontend Label"/>
  288. <column xsi:type="varchar" name="frontend_class" nullable="true" length="255" comment="Frontend Class"/>
  289. <column xsi:type="varchar" name="source_model" nullable="true" length="255" comment="Source Model"/>
  290. <column xsi:type="smallint" name="is_required" unsigned="true" nullable="false" identity="false"
  291. default="0" comment="Defines Is Required"/>
  292. <column xsi:type="smallint" name="is_user_defined" unsigned="true" nullable="false" identity="false"
  293. default="0" comment="Defines Is User Defined"/>
  294. <column xsi:type="text" name="default_value" nullable="true" comment="Default Value"/>
  295. <column xsi:type="smallint" name="is_unique" unsigned="true" nullable="false" identity="false"
  296. default="0" comment="Defines Is Unique"/>
  297. <column xsi:type="varchar" name="note" nullable="true" length="255" comment="Note"/>
  298. <constraint xsi:type="primary" referenceId="PRIMARY">
  299. <column name="attribute_id"/>
  300. </constraint>
  301. <constraint xsi:type="foreign" referenceId="EAV_ATTRIBUTE_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID"
  302. table="eav_attribute" column="entity_type_id" referenceTable="eav_entity_type"
  303. referenceColumn="entity_type_id" onDelete="CASCADE"/>
  304. <constraint xsi:type="unique" referenceId="EAV_ATTRIBUTE_ENTITY_TYPE_ID_ATTRIBUTE_CODE">
  305. <column name="entity_type_id"/>
  306. <column name="attribute_code"/>
  307. </constraint>
  308. <index referenceId="EAV_ATTRIBUTE_FRONTEND_INPUT_ENTITY_TYPE_ID_IS_USER_DEFINED" indexType="btree">
  309. <column name="frontend_input"/>
  310. <column name="entity_type_id"/>
  311. <column name="is_user_defined"/>
  312. </index>
  313. </table>
  314. <table name="eav_entity_store" resource="default" engine="innodb" comment="Eav Entity Store">
  315. <column xsi:type="int" name="entity_store_id" unsigned="true" nullable="false" identity="true"
  316. comment="Entity Store ID"/>
  317. <column xsi:type="smallint" name="entity_type_id" unsigned="true" nullable="false" identity="false"
  318. default="0" comment="Entity Type ID"/>
  319. <column xsi:type="smallint" name="store_id" unsigned="true" nullable="false" identity="false"
  320. default="0" comment="Store ID"/>
  321. <column xsi:type="varchar" name="increment_prefix" nullable="true" length="20" comment="Increment Prefix"/>
  322. <column xsi:type="varchar" name="increment_last_id" nullable="true" length="50" comment="Last Incremented ID"/>
  323. <constraint xsi:type="primary" referenceId="PRIMARY">
  324. <column name="entity_store_id"/>
  325. </constraint>
  326. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_STORE_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID"
  327. table="eav_entity_store" column="entity_type_id" referenceTable="eav_entity_type"
  328. referenceColumn="entity_type_id" onDelete="CASCADE"/>
  329. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_STORE_STORE_ID_STORE_STORE_ID" table="eav_entity_store"
  330. column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
  331. <index referenceId="EAV_ENTITY_STORE_ENTITY_TYPE_ID" indexType="btree">
  332. <column name="entity_type_id"/>
  333. </index>
  334. <index referenceId="EAV_ENTITY_STORE_STORE_ID" indexType="btree">
  335. <column name="store_id"/>
  336. </index>
  337. </table>
  338. <table name="eav_attribute_set" resource="default" engine="innodb" comment="Eav Attribute Set">
  339. <column xsi:type="smallint" name="attribute_set_id" unsigned="true" nullable="false" identity="true"
  340. comment="Attribute Set ID"/>
  341. <column xsi:type="smallint" name="entity_type_id" unsigned="true" nullable="false" identity="false"
  342. default="0" comment="Entity Type ID"/>
  343. <column xsi:type="varchar" name="attribute_set_name" nullable="true" length="255" comment="Attribute Set Name"/>
  344. <column xsi:type="smallint" name="sort_order" unsigned="false" nullable="false" identity="false"
  345. default="0" comment="Sort Order"/>
  346. <constraint xsi:type="primary" referenceId="PRIMARY">
  347. <column name="attribute_set_id"/>
  348. </constraint>
  349. <constraint xsi:type="foreign" referenceId="EAV_ATTRIBUTE_SET_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID"
  350. table="eav_attribute_set" column="entity_type_id" referenceTable="eav_entity_type"
  351. referenceColumn="entity_type_id" onDelete="CASCADE"/>
  352. <constraint xsi:type="unique" referenceId="EAV_ATTRIBUTE_SET_ENTITY_TYPE_ID_ATTRIBUTE_SET_NAME">
  353. <column name="entity_type_id"/>
  354. <column name="attribute_set_name"/>
  355. </constraint>
  356. <index referenceId="EAV_ATTRIBUTE_SET_ENTITY_TYPE_ID_SORT_ORDER" indexType="btree">
  357. <column name="entity_type_id"/>
  358. <column name="sort_order"/>
  359. </index>
  360. </table>
  361. <table name="eav_attribute_group" resource="default" engine="innodb" comment="Eav Attribute Group">
  362. <column xsi:type="smallint" name="attribute_group_id" unsigned="true" nullable="false"
  363. identity="true" comment="Attribute Group ID"/>
  364. <column xsi:type="smallint" name="attribute_set_id" unsigned="true" nullable="false"
  365. identity="false" default="0" comment="Attribute Set ID"/>
  366. <column xsi:type="varchar" name="attribute_group_name" nullable="true" length="255"
  367. comment="Attribute Group Name"/>
  368. <column xsi:type="smallint" name="sort_order" unsigned="false" nullable="false" identity="false"
  369. default="0" comment="Sort Order"/>
  370. <column xsi:type="smallint" name="default_id" unsigned="true" nullable="true" identity="false"
  371. default="0" comment="Default ID"/>
  372. <column xsi:type="varchar" name="attribute_group_code" nullable="false" length="255"
  373. comment="Attribute Group Code"/>
  374. <column xsi:type="varchar" name="tab_group_code" nullable="true" length="255" comment="Tab Group Code"/>
  375. <constraint xsi:type="primary" referenceId="PRIMARY">
  376. <column name="attribute_group_id"/>
  377. </constraint>
  378. <constraint xsi:type="foreign" referenceId="EAV_ATTR_GROUP_ATTR_SET_ID_EAV_ATTR_SET_ATTR_SET_ID"
  379. table="eav_attribute_group" column="attribute_set_id" referenceTable="eav_attribute_set"
  380. referenceColumn="attribute_set_id" onDelete="CASCADE"/>
  381. <constraint xsi:type="unique" referenceId="EAV_ATTRIBUTE_GROUP_ATTRIBUTE_SET_ID_ATTRIBUTE_GROUP_NAME">
  382. <column name="attribute_set_id"/>
  383. <column name="attribute_group_name"/>
  384. </constraint>
  385. <constraint xsi:type="unique" referenceId="EAV_ATTRIBUTE_GROUP_ATTRIBUTE_SET_ID_ATTRIBUTE_GROUP_CODE">
  386. <column name="attribute_set_id"/>
  387. <column name="attribute_group_code"/>
  388. </constraint>
  389. <index referenceId="EAV_ATTRIBUTE_GROUP_ATTRIBUTE_SET_ID_SORT_ORDER" indexType="btree">
  390. <column name="attribute_set_id"/>
  391. <column name="sort_order"/>
  392. </index>
  393. </table>
  394. <table name="eav_entity_attribute" resource="default" engine="innodb" comment="Eav Entity Attributes">
  395. <column xsi:type="int" name="entity_attribute_id" unsigned="true" nullable="false" identity="true"
  396. comment="Entity Attribute ID"/>
  397. <column xsi:type="smallint" name="entity_type_id" unsigned="true" nullable="false" identity="false"
  398. default="0" comment="Entity Type ID"/>
  399. <column xsi:type="smallint" name="attribute_set_id" unsigned="true" nullable="false"
  400. identity="false" default="0" comment="Attribute Set ID"/>
  401. <column xsi:type="smallint" name="attribute_group_id" unsigned="true" nullable="false"
  402. identity="false" default="0" comment="Attribute Group ID"/>
  403. <column xsi:type="smallint" name="attribute_id" unsigned="true" nullable="false" identity="false"
  404. default="0" comment="Attribute ID"/>
  405. <column xsi:type="smallint" name="sort_order" unsigned="false" nullable="false" identity="false"
  406. default="0" comment="Sort Order"/>
  407. <constraint xsi:type="primary" referenceId="PRIMARY">
  408. <column name="entity_attribute_id"/>
  409. </constraint>
  410. <constraint xsi:type="foreign" referenceId="EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID"
  411. table="eav_entity_attribute" column="attribute_id" referenceTable="eav_attribute"
  412. referenceColumn="attribute_id" onDelete="CASCADE"/>
  413. <constraint xsi:type="foreign" referenceId="EAV_ENTT_ATTR_ATTR_GROUP_ID_EAV_ATTR_GROUP_ATTR_GROUP_ID"
  414. table="eav_entity_attribute" column="attribute_group_id" referenceTable="eav_attribute_group"
  415. referenceColumn="attribute_group_id" onDelete="CASCADE"/>
  416. <constraint xsi:type="unique" referenceId="EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_SET_ID_ATTRIBUTE_ID">
  417. <column name="attribute_set_id"/>
  418. <column name="attribute_id"/>
  419. </constraint>
  420. <constraint xsi:type="unique" referenceId="EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_GROUP_ID_ATTRIBUTE_ID">
  421. <column name="attribute_group_id"/>
  422. <column name="attribute_id"/>
  423. </constraint>
  424. <index referenceId="EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_SET_ID_SORT_ORDER" indexType="btree">
  425. <column name="attribute_set_id"/>
  426. <column name="sort_order"/>
  427. </index>
  428. <index referenceId="EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_ID" indexType="btree">
  429. <column name="attribute_id"/>
  430. </index>
  431. </table>
  432. <table name="eav_attribute_option" resource="default" engine="innodb" comment="Eav Attribute Option">
  433. <column xsi:type="int" name="option_id" unsigned="true" nullable="false" identity="true"
  434. comment="Option ID"/>
  435. <column xsi:type="smallint" name="attribute_id" unsigned="true" nullable="false" identity="false"
  436. default="0" comment="Attribute ID"/>
  437. <column xsi:type="smallint" name="sort_order" unsigned="true" nullable="false" identity="false"
  438. default="0" comment="Sort Order"/>
  439. <constraint xsi:type="primary" referenceId="PRIMARY">
  440. <column name="option_id"/>
  441. </constraint>
  442. <constraint xsi:type="foreign" referenceId="EAV_ATTRIBUTE_OPTION_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID"
  443. table="eav_attribute_option" column="attribute_id" referenceTable="eav_attribute"
  444. referenceColumn="attribute_id" onDelete="CASCADE"/>
  445. <index referenceId="EAV_ATTRIBUTE_OPTION_ATTRIBUTE_ID" indexType="btree">
  446. <column name="attribute_id"/>
  447. </index>
  448. </table>
  449. <table name="eav_attribute_option_value" resource="default" engine="innodb" comment="Eav Attribute Option Value">
  450. <column xsi:type="int" name="value_id" unsigned="true" nullable="false" identity="true"
  451. comment="Value ID"/>
  452. <column xsi:type="int" name="option_id" unsigned="true" nullable="false" identity="false"
  453. default="0" comment="Option ID"/>
  454. <column xsi:type="smallint" name="store_id" unsigned="true" nullable="false" identity="false"
  455. default="0" comment="Store ID"/>
  456. <column xsi:type="varchar" name="value" nullable="true" length="255" comment="Value"/>
  457. <constraint xsi:type="primary" referenceId="PRIMARY">
  458. <column name="value_id"/>
  459. </constraint>
  460. <constraint xsi:type="foreign" referenceId="EAV_ATTR_OPT_VAL_OPT_ID_EAV_ATTR_OPT_OPT_ID"
  461. table="eav_attribute_option_value" column="option_id" referenceTable="eav_attribute_option"
  462. referenceColumn="option_id" onDelete="CASCADE"/>
  463. <constraint xsi:type="foreign" referenceId="EAV_ATTRIBUTE_OPTION_VALUE_STORE_ID_STORE_STORE_ID"
  464. table="eav_attribute_option_value" column="store_id" referenceTable="store"
  465. referenceColumn="store_id" onDelete="CASCADE"/>
  466. <index referenceId="EAV_ATTRIBUTE_OPTION_VALUE_OPTION_ID" indexType="btree">
  467. <column name="option_id"/>
  468. </index>
  469. <index referenceId="EAV_ATTRIBUTE_OPTION_VALUE_STORE_ID" indexType="btree">
  470. <column name="store_id"/>
  471. </index>
  472. </table>
  473. <table name="eav_attribute_label" resource="default" engine="innodb" comment="Eav Attribute Label">
  474. <column xsi:type="int" name="attribute_label_id" unsigned="true" nullable="false" identity="true"
  475. comment="Attribute Label ID"/>
  476. <column xsi:type="smallint" name="attribute_id" unsigned="true" nullable="false" identity="false"
  477. default="0" comment="Attribute ID"/>
  478. <column xsi:type="smallint" name="store_id" unsigned="true" nullable="false" identity="false"
  479. default="0" comment="Store ID"/>
  480. <column xsi:type="varchar" name="value" nullable="true" length="255" comment="Value"/>
  481. <constraint xsi:type="primary" referenceId="PRIMARY">
  482. <column name="attribute_label_id"/>
  483. </constraint>
  484. <constraint xsi:type="foreign" referenceId="EAV_ATTRIBUTE_LABEL_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID"
  485. table="eav_attribute_label" column="attribute_id" referenceTable="eav_attribute"
  486. referenceColumn="attribute_id" onDelete="CASCADE"/>
  487. <constraint xsi:type="foreign" referenceId="EAV_ATTRIBUTE_LABEL_STORE_ID_STORE_STORE_ID" table="eav_attribute_label"
  488. column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
  489. <index referenceId="EAV_ATTRIBUTE_LABEL_STORE_ID" indexType="btree">
  490. <column name="store_id"/>
  491. </index>
  492. <index referenceId="EAV_ATTRIBUTE_LABEL_ATTRIBUTE_ID_STORE_ID" indexType="btree">
  493. <column name="attribute_id"/>
  494. <column name="store_id"/>
  495. </index>
  496. </table>
  497. <table name="eav_form_type" resource="default" engine="innodb" comment="Eav Form Type">
  498. <column xsi:type="smallint" name="type_id" unsigned="true" nullable="false" identity="true"
  499. comment="Type ID"/>
  500. <column xsi:type="varchar" name="code" nullable="false" length="64" comment="Code"/>
  501. <column xsi:type="varchar" name="label" nullable="false" length="255" comment="Label"/>
  502. <column xsi:type="smallint" name="is_system" unsigned="true" nullable="false" identity="false"
  503. default="0" comment="Is System"/>
  504. <column xsi:type="varchar" name="theme" nullable="true" length="64" comment="Theme"/>
  505. <column xsi:type="smallint" name="store_id" unsigned="true" nullable="false" identity="false"
  506. comment="Store ID"/>
  507. <constraint xsi:type="primary" referenceId="PRIMARY">
  508. <column name="type_id"/>
  509. </constraint>
  510. <constraint xsi:type="foreign" referenceId="EAV_FORM_TYPE_STORE_ID_STORE_STORE_ID" table="eav_form_type"
  511. column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
  512. <constraint xsi:type="unique" referenceId="EAV_FORM_TYPE_CODE_THEME_STORE_ID">
  513. <column name="code"/>
  514. <column name="theme"/>
  515. <column name="store_id"/>
  516. </constraint>
  517. <index referenceId="EAV_FORM_TYPE_STORE_ID" indexType="btree">
  518. <column name="store_id"/>
  519. </index>
  520. </table>
  521. <table name="eav_form_type_entity" resource="default" engine="innodb" comment="Eav Form Type Entity">
  522. <column xsi:type="smallint" name="type_id" unsigned="true" nullable="false" identity="false"
  523. comment="Type ID"/>
  524. <column xsi:type="smallint" name="entity_type_id" unsigned="true" nullable="false" identity="false"
  525. comment="Entity Type ID"/>
  526. <constraint xsi:type="primary" referenceId="PRIMARY">
  527. <column name="type_id"/>
  528. <column name="entity_type_id"/>
  529. </constraint>
  530. <constraint xsi:type="foreign" referenceId="EAV_FORM_TYPE_ENTT_ENTT_TYPE_ID_EAV_ENTT_TYPE_ENTT_TYPE_ID"
  531. table="eav_form_type_entity" column="entity_type_id" referenceTable="eav_entity_type"
  532. referenceColumn="entity_type_id" onDelete="CASCADE"/>
  533. <constraint xsi:type="foreign" referenceId="EAV_FORM_TYPE_ENTITY_TYPE_ID_EAV_FORM_TYPE_TYPE_ID"
  534. table="eav_form_type_entity" column="type_id" referenceTable="eav_form_type"
  535. referenceColumn="type_id" onDelete="CASCADE"/>
  536. <index referenceId="EAV_FORM_TYPE_ENTITY_ENTITY_TYPE_ID" indexType="btree">
  537. <column name="entity_type_id"/>
  538. </index>
  539. </table>
  540. <table name="eav_form_fieldset" resource="default" engine="innodb" comment="Eav Form Fieldset">
  541. <column xsi:type="smallint" name="fieldset_id" unsigned="true" nullable="false" identity="true"
  542. comment="Fieldset ID"/>
  543. <column xsi:type="smallint" name="type_id" unsigned="true" nullable="false" identity="false"
  544. comment="Type ID"/>
  545. <column xsi:type="varchar" name="code" nullable="false" length="64" comment="Code"/>
  546. <column xsi:type="int" name="sort_order" unsigned="false" nullable="false" identity="false"
  547. default="0" comment="Sort Order"/>
  548. <constraint xsi:type="primary" referenceId="PRIMARY">
  549. <column name="fieldset_id"/>
  550. </constraint>
  551. <constraint xsi:type="foreign" referenceId="EAV_FORM_FIELDSET_TYPE_ID_EAV_FORM_TYPE_TYPE_ID" table="eav_form_fieldset"
  552. column="type_id" referenceTable="eav_form_type" referenceColumn="type_id" onDelete="CASCADE"/>
  553. <constraint xsi:type="unique" referenceId="EAV_FORM_FIELDSET_TYPE_ID_CODE">
  554. <column name="type_id"/>
  555. <column name="code"/>
  556. </constraint>
  557. </table>
  558. <table name="eav_form_fieldset_label" resource="default" engine="innodb" comment="Eav Form Fieldset Label">
  559. <column xsi:type="smallint" name="fieldset_id" unsigned="true" nullable="false" identity="false"
  560. comment="Fieldset ID"/>
  561. <column xsi:type="smallint" name="store_id" unsigned="true" nullable="false" identity="false"
  562. comment="Store ID"/>
  563. <column xsi:type="varchar" name="label" nullable="false" length="255" comment="Label"/>
  564. <constraint xsi:type="primary" referenceId="PRIMARY">
  565. <column name="fieldset_id"/>
  566. <column name="store_id"/>
  567. </constraint>
  568. <constraint xsi:type="foreign" referenceId="EAV_FORM_FSET_LBL_FSET_ID_EAV_FORM_FSET_FSET_ID"
  569. table="eav_form_fieldset_label" column="fieldset_id" referenceTable="eav_form_fieldset"
  570. referenceColumn="fieldset_id" onDelete="CASCADE"/>
  571. <constraint xsi:type="foreign" referenceId="EAV_FORM_FIELDSET_LABEL_STORE_ID_STORE_STORE_ID"
  572. table="eav_form_fieldset_label" column="store_id" referenceTable="store" referenceColumn="store_id"
  573. onDelete="CASCADE"/>
  574. <index referenceId="EAV_FORM_FIELDSET_LABEL_STORE_ID" indexType="btree">
  575. <column name="store_id"/>
  576. </index>
  577. </table>
  578. <table name="eav_form_element" resource="default" engine="innodb" comment="Eav Form Element">
  579. <column xsi:type="int" name="element_id" unsigned="true" nullable="false" identity="true"
  580. comment="Element ID"/>
  581. <column xsi:type="smallint" name="type_id" unsigned="true" nullable="false" identity="false"
  582. comment="Type ID"/>
  583. <column xsi:type="smallint" name="fieldset_id" unsigned="true" nullable="true" identity="false"
  584. comment="Fieldset ID"/>
  585. <column xsi:type="smallint" name="attribute_id" unsigned="true" nullable="false" identity="false"
  586. comment="Attribute ID"/>
  587. <column xsi:type="int" name="sort_order" unsigned="false" nullable="false" identity="false"
  588. default="0" comment="Sort Order"/>
  589. <constraint xsi:type="primary" referenceId="PRIMARY">
  590. <column name="element_id"/>
  591. </constraint>
  592. <constraint xsi:type="foreign" referenceId="EAV_FORM_ELEMENT_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID"
  593. table="eav_form_element" column="attribute_id" referenceTable="eav_attribute"
  594. referenceColumn="attribute_id" onDelete="CASCADE"/>
  595. <constraint xsi:type="foreign" referenceId="EAV_FORM_ELEMENT_FIELDSET_ID_EAV_FORM_FIELDSET_FIELDSET_ID"
  596. table="eav_form_element" column="fieldset_id" referenceTable="eav_form_fieldset"
  597. referenceColumn="fieldset_id" onDelete="SET NULL"/>
  598. <constraint xsi:type="foreign" referenceId="EAV_FORM_ELEMENT_TYPE_ID_EAV_FORM_TYPE_TYPE_ID" table="eav_form_element"
  599. column="type_id" referenceTable="eav_form_type" referenceColumn="type_id" onDelete="CASCADE"/>
  600. <constraint xsi:type="unique" referenceId="EAV_FORM_ELEMENT_TYPE_ID_ATTRIBUTE_ID">
  601. <column name="type_id"/>
  602. <column name="attribute_id"/>
  603. </constraint>
  604. <index referenceId="EAV_FORM_ELEMENT_FIELDSET_ID" indexType="btree">
  605. <column name="fieldset_id"/>
  606. </index>
  607. <index referenceId="EAV_FORM_ELEMENT_ATTRIBUTE_ID" indexType="btree">
  608. <column name="attribute_id"/>
  609. </index>
  610. </table>
  611. </schema>