Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

516 rindas
39 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="quote" resource="checkout" engine="innodb" comment="Sales Flat Quote">
  11. <column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="true"
  12. comment="Entity ID"/>
  13. <column xsi:type="smallint" name="store_id" unsigned="true" nullable="false" identity="false"
  14. default="0" comment="Store ID"/>
  15. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  16. comment="Created At"/>
  17. <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"/>
  18. <column xsi:type="timestamp" name="converted_at" on_update="false" nullable="true" comment="Converted At"/>
  19. <column xsi:type="smallint" name="is_active" unsigned="true" nullable="true" identity="false"
  20. default="1" comment="Is Active"/>
  21. <column xsi:type="smallint" name="is_virtual" unsigned="true" nullable="true" identity="false"
  22. default="0" comment="Is Virtual"/>
  23. <column xsi:type="smallint" name="is_multi_shipping" unsigned="true" nullable="true"
  24. identity="false" default="0" comment="Is Multi Shipping"/>
  25. <column xsi:type="int" name="items_count" unsigned="true" nullable="true" identity="false"
  26. default="0" comment="Items Count"/>
  27. <column xsi:type="decimal" name="items_qty" scale="4" precision="12" unsigned="false" nullable="true"
  28. default="0" comment="Items Qty"/>
  29. <column xsi:type="int" name="orig_order_id" unsigned="true" nullable="true" identity="false"
  30. default="0" comment="Orig Order ID"/>
  31. <column xsi:type="decimal" name="store_to_base_rate" scale="4" precision="12" unsigned="false" nullable="true"
  32. default="0" comment="Store To Base Rate"/>
  33. <column xsi:type="decimal" name="store_to_quote_rate" scale="4" precision="12" unsigned="false" nullable="true"
  34. default="0" comment="Store To Quote Rate"/>
  35. <column xsi:type="varchar" name="base_currency_code" nullable="true" length="255" comment="Base Currency Code"/>
  36. <column xsi:type="varchar" name="store_currency_code" nullable="true" length="255"
  37. comment="Store Currency Code"/>
  38. <column xsi:type="varchar" name="quote_currency_code" nullable="true" length="255"
  39. comment="Quote Currency Code"/>
  40. <column xsi:type="decimal" name="grand_total" scale="4" precision="20" unsigned="false" nullable="true"
  41. default="0" comment="Grand Total"/>
  42. <column xsi:type="decimal" name="base_grand_total" scale="4" precision="20" unsigned="false" nullable="true"
  43. default="0" comment="Base Grand Total"/>
  44. <column xsi:type="varchar" name="checkout_method" nullable="true" length="255" comment="Checkout Method"/>
  45. <column xsi:type="int" name="customer_id" unsigned="true" nullable="true" identity="false"
  46. comment="Customer ID"/>
  47. <column xsi:type="int" name="customer_tax_class_id" unsigned="true" nullable="true"
  48. identity="false" comment="Customer Tax Class ID"/>
  49. <column xsi:type="int" name="customer_group_id" unsigned="true" nullable="true" identity="false"
  50. default="0" comment="Customer Group ID"/>
  51. <column xsi:type="varchar" name="customer_email" nullable="true" length="255" comment="Customer Email"/>
  52. <column xsi:type="varchar" name="customer_prefix" nullable="true" length="40" comment="Customer Prefix"/>
  53. <column xsi:type="varchar" name="customer_firstname" nullable="true" length="255" comment="Customer Firstname"/>
  54. <column xsi:type="varchar" name="customer_middlename" nullable="true" length="40"
  55. comment="Customer Middlename"/>
  56. <column xsi:type="varchar" name="customer_lastname" nullable="true" length="255" comment="Customer Lastname"/>
  57. <column xsi:type="varchar" name="customer_suffix" nullable="true" length="40" comment="Customer Suffix"/>
  58. <column xsi:type="datetime" name="customer_dob" on_update="false" nullable="true" comment="Customer Dob"/>
  59. <column xsi:type="text" name="customer_note" nullable="true" comment="Customer Note"/>
  60. <column xsi:type="smallint" name="customer_note_notify" unsigned="true" nullable="true"
  61. identity="false" default="1" comment="Customer Note Notify"/>
  62. <column xsi:type="smallint" name="customer_is_guest" unsigned="true" nullable="true"
  63. identity="false" default="0" comment="Customer Is Guest"/>
  64. <column xsi:type="varchar" name="remote_ip" nullable="true" length="45" comment="Remote Ip"/>
  65. <column xsi:type="varchar" name="applied_rule_ids" nullable="true" length="255" comment="Applied Rule Ids"/>
  66. <column xsi:type="varchar" name="reserved_order_id" nullable="true" length="64" comment="Reserved Order ID"/>
  67. <column xsi:type="varchar" name="password_hash" nullable="true" length="255" comment="Password Hash"/>
  68. <column xsi:type="varchar" name="coupon_code" nullable="true" length="255" comment="Coupon Code"/>
  69. <column xsi:type="varchar" name="global_currency_code" nullable="true" length="255"
  70. comment="Global Currency Code"/>
  71. <column xsi:type="decimal" name="base_to_global_rate" scale="4" precision="20" unsigned="false" nullable="true"
  72. comment="Base To Global Rate"/>
  73. <column xsi:type="decimal" name="base_to_quote_rate" scale="4" precision="20" unsigned="false" nullable="true"
  74. comment="Base To Quote Rate"/>
  75. <column xsi:type="varchar" name="customer_taxvat" nullable="true" length="255" comment="Customer Taxvat"/>
  76. <column xsi:type="varchar" name="customer_gender" nullable="true" length="255" comment="Customer Gender"/>
  77. <column xsi:type="decimal" name="subtotal" scale="4" precision="20" unsigned="false" nullable="true"
  78. comment="Subtotal"/>
  79. <column xsi:type="decimal" name="base_subtotal" scale="4" precision="20" unsigned="false" nullable="true"
  80. comment="Base Subtotal"/>
  81. <column xsi:type="decimal" name="subtotal_with_discount" scale="4" precision="20" unsigned="false"
  82. nullable="true" comment="Subtotal With Discount"/>
  83. <column xsi:type="decimal" name="base_subtotal_with_discount" scale="4" precision="20" unsigned="false"
  84. nullable="true" comment="Base Subtotal With Discount"/>
  85. <column xsi:type="int" name="is_changed" unsigned="true" nullable="true" identity="false"
  86. comment="Is Changed"/>
  87. <column xsi:type="smallint" name="trigger_recollect" unsigned="false" nullable="false"
  88. identity="false" default="0" comment="Trigger Recollect"/>
  89. <column xsi:type="text" name="ext_shipping_info" nullable="true" comment="Ext Shipping Info"/>
  90. <constraint xsi:type="primary" referenceId="PRIMARY">
  91. <column name="entity_id"/>
  92. </constraint>
  93. <constraint xsi:type="foreign" referenceId="QUOTE_STORE_ID_STORE_STORE_ID" table="quote" column="store_id"
  94. referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
  95. <index referenceId="QUOTE_CUSTOMER_ID_STORE_ID_IS_ACTIVE" indexType="btree">
  96. <column name="customer_id"/>
  97. <column name="store_id"/>
  98. <column name="is_active"/>
  99. </index>
  100. <index referenceId="QUOTE_STORE_ID" indexType="btree">
  101. <column name="store_id"/>
  102. </index>
  103. </table>
  104. <table name="quote_address" resource="checkout" engine="innodb" comment="Sales Flat Quote Address">
  105. <column xsi:type="int" name="address_id" unsigned="true" nullable="false" identity="true"
  106. comment="Address ID"/>
  107. <column xsi:type="int" name="quote_id" unsigned="true" nullable="false" identity="false"
  108. default="0" comment="Quote ID"/>
  109. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  110. comment="Created At"/>
  111. <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
  112. comment="Updated At"/>
  113. <column xsi:type="int" name="customer_id" unsigned="true" nullable="true" identity="false"
  114. comment="Customer ID"/>
  115. <column xsi:type="smallint" name="save_in_address_book" unsigned="false" nullable="true"
  116. identity="false" default="0" comment="Save In Address Book"/>
  117. <column xsi:type="int" name="customer_address_id" unsigned="true" nullable="true" identity="false"
  118. comment="Customer Address ID"/>
  119. <column xsi:type="varchar" name="address_type" nullable="true" length="10" comment="Address Type"/>
  120. <column xsi:type="varchar" name="email" nullable="true" length="255" comment="Email"/>
  121. <column xsi:type="varchar" name="prefix" nullable="true" length="40" comment="Prefix"/>
  122. <column xsi:type="varchar" name="firstname" nullable="true" length="255"/>
  123. <column xsi:type="varchar" name="middlename" nullable="true" length="40"/>
  124. <column xsi:type="varchar" name="lastname" nullable="true" length="255"/>
  125. <column xsi:type="varchar" name="suffix" nullable="true" length="40" comment="Suffix"/>
  126. <column xsi:type="varchar" name="company" nullable="true" length="255" comment="Company"/>
  127. <column xsi:type="varchar" name="street" nullable="true" length="255" onCreate="migrateDataFrom(street)"
  128. comment="Street"/>
  129. <column xsi:type="varchar" name="city" nullable="true" length="255"/>
  130. <column xsi:type="varchar" name="region" nullable="true" length="255"/>
  131. <column xsi:type="int" name="region_id" unsigned="true" nullable="true" identity="false"
  132. comment="Region ID"/>
  133. <column xsi:type="varchar" name="postcode" nullable="true" length="20" comment="Postcode"/>
  134. <column xsi:type="varchar" name="country_id" nullable="true" length="30" comment="Country ID"/>
  135. <column xsi:type="varchar" name="telephone" nullable="true" length="255"/>
  136. <column xsi:type="varchar" name="fax" nullable="true" length="255"/>
  137. <column xsi:type="smallint" name="same_as_billing" unsigned="true" nullable="false" identity="false"
  138. default="0" comment="Same As Billing"/>
  139. <column xsi:type="smallint" name="collect_shipping_rates" unsigned="true" nullable="false"
  140. identity="false" default="0" comment="Collect Shipping Rates"/>
  141. <column xsi:type="varchar" name="shipping_method" nullable="true" length="120"/>
  142. <column xsi:type="varchar" name="shipping_description" nullable="true" length="255"
  143. comment="Shipping Description"/>
  144. <column xsi:type="decimal" name="weight" scale="4" precision="12" unsigned="false" nullable="false" default="0"
  145. comment="Weight"/>
  146. <column xsi:type="decimal" name="subtotal" scale="4" precision="20" unsigned="false" nullable="false"
  147. default="0" comment="Subtotal"/>
  148. <column xsi:type="decimal" name="base_subtotal" scale="4" precision="20" unsigned="false" nullable="false"
  149. default="0" comment="Base Subtotal"/>
  150. <column xsi:type="decimal" name="subtotal_with_discount" scale="4" precision="20" unsigned="false"
  151. nullable="false" default="0" comment="Subtotal With Discount"/>
  152. <column xsi:type="decimal" name="base_subtotal_with_discount" scale="4" precision="20" unsigned="false"
  153. nullable="false" default="0" comment="Base Subtotal With Discount"/>
  154. <column xsi:type="decimal" name="tax_amount" scale="4" precision="20" unsigned="false" nullable="false"
  155. default="0" comment="Tax Amount"/>
  156. <column xsi:type="decimal" name="base_tax_amount" scale="4" precision="20" unsigned="false" nullable="false"
  157. default="0" comment="Base Tax Amount"/>
  158. <column xsi:type="decimal" name="shipping_amount" scale="4" precision="20" unsigned="false" nullable="false"
  159. default="0" comment="Shipping Amount"/>
  160. <column xsi:type="decimal" name="base_shipping_amount" scale="4" precision="20" unsigned="false"
  161. nullable="false" default="0" comment="Base Shipping Amount"/>
  162. <column xsi:type="decimal" name="shipping_tax_amount" scale="4" precision="20" unsigned="false" nullable="true"
  163. comment="Shipping Tax Amount"/>
  164. <column xsi:type="decimal" name="base_shipping_tax_amount" scale="4" precision="20" unsigned="false"
  165. nullable="true" comment="Base Shipping Tax Amount"/>
  166. <column xsi:type="decimal" name="discount_amount" scale="4" precision="20" unsigned="false" nullable="false"
  167. default="0" comment="Discount Amount"/>
  168. <column xsi:type="decimal" name="base_discount_amount" scale="4" precision="20" unsigned="false"
  169. nullable="false" default="0" comment="Base Discount Amount"/>
  170. <column xsi:type="decimal" name="grand_total" scale="4" precision="20" unsigned="false" nullable="false"
  171. default="0" comment="Grand Total"/>
  172. <column xsi:type="decimal" name="base_grand_total" scale="4" precision="20" unsigned="false" nullable="false"
  173. default="0" comment="Base Grand Total"/>
  174. <column xsi:type="text" name="customer_notes" nullable="true" comment="Customer Notes"/>
  175. <column xsi:type="text" name="applied_taxes" nullable="true" comment="Applied Taxes"/>
  176. <column xsi:type="varchar" name="discount_description" nullable="true" length="255"
  177. comment="Discount Description"/>
  178. <column xsi:type="decimal" name="shipping_discount_amount" scale="4" precision="20" unsigned="false"
  179. nullable="true" comment="Shipping Discount Amount"/>
  180. <column xsi:type="decimal" name="base_shipping_discount_amount" scale="4" precision="20" unsigned="false"
  181. nullable="true" comment="Base Shipping Discount Amount"/>
  182. <column xsi:type="decimal" name="subtotal_incl_tax" scale="4" precision="20" unsigned="false" nullable="true"
  183. comment="Subtotal Incl Tax"/>
  184. <column xsi:type="decimal" name="base_subtotal_total_incl_tax" scale="4" precision="20" unsigned="false"
  185. nullable="true" comment="Base Subtotal Total Incl Tax"/>
  186. <column xsi:type="decimal" name="discount_tax_compensation_amount" scale="4" precision="20" unsigned="false"
  187. nullable="true" comment="Discount Tax Compensation Amount"/>
  188. <column xsi:type="decimal" name="base_discount_tax_compensation_amount" scale="4" precision="20"
  189. unsigned="false" nullable="true" comment="Base Discount Tax Compensation Amount"/>
  190. <column xsi:type="decimal" name="shipping_discount_tax_compensation_amount" scale="4" precision="20"
  191. unsigned="false" nullable="true" comment="Shipping Discount Tax Compensation Amount"/>
  192. <column xsi:type="decimal" name="base_shipping_discount_tax_compensation_amnt" scale="4" precision="20"
  193. unsigned="false" nullable="true" comment="Base Shipping Discount Tax Compensation Amount"/>
  194. <column xsi:type="decimal" name="shipping_incl_tax" scale="4" precision="20" unsigned="false" nullable="true"
  195. comment="Shipping Incl Tax"/>
  196. <column xsi:type="decimal" name="base_shipping_incl_tax" scale="4" precision="20" unsigned="false"
  197. nullable="true" comment="Base Shipping Incl Tax"/>
  198. <column xsi:type="text" name="vat_id" nullable="true" comment="Vat ID"/>
  199. <column xsi:type="smallint" name="vat_is_valid" unsigned="false" nullable="true" identity="false"
  200. comment="Vat Is Valid"/>
  201. <column xsi:type="text" name="vat_request_id" nullable="true" comment="Vat Request ID"/>
  202. <column xsi:type="text" name="vat_request_date" nullable="true" comment="Vat Request Date"/>
  203. <column xsi:type="smallint" name="vat_request_success" unsigned="false" nullable="true"
  204. identity="false" comment="Vat Request Success"/>
  205. <column xsi:type="text" name="validated_country_code" nullable="true" comment="Validated Country Code"/>
  206. <column xsi:type="text" name="validated_vat_number" nullable="true" comment="Validated Vat Number"/>
  207. <constraint xsi:type="primary" referenceId="PRIMARY">
  208. <column name="address_id"/>
  209. </constraint>
  210. <constraint xsi:type="foreign" referenceId="QUOTE_ADDRESS_QUOTE_ID_QUOTE_ENTITY_ID" table="quote_address"
  211. column="quote_id" referenceTable="quote" referenceColumn="entity_id" onDelete="CASCADE"/>
  212. <index referenceId="QUOTE_ADDRESS_QUOTE_ID" indexType="btree">
  213. <column name="quote_id"/>
  214. </index>
  215. </table>
  216. <table name="quote_item" resource="checkout" engine="innodb" comment="Sales Flat Quote Item">
  217. <column xsi:type="int" name="item_id" unsigned="true" nullable="false" identity="true"
  218. comment="Item ID"/>
  219. <column xsi:type="int" name="quote_id" unsigned="true" nullable="false" identity="false"
  220. default="0" comment="Quote ID"/>
  221. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  222. comment="Created At"/>
  223. <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
  224. comment="Updated At"/>
  225. <column xsi:type="int" name="product_id" unsigned="true" nullable="true" identity="false"
  226. comment="Product ID"/>
  227. <column xsi:type="smallint" name="store_id" unsigned="true" nullable="true" identity="false"
  228. comment="Store ID"/>
  229. <column xsi:type="int" name="parent_item_id" unsigned="true" nullable="true" identity="false"
  230. comment="Parent Item ID"/>
  231. <column xsi:type="smallint" name="is_virtual" unsigned="true" nullable="true" identity="false"
  232. comment="Is Virtual"/>
  233. <column xsi:type="varchar" name="sku" nullable="true" length="255" comment="Sku"/>
  234. <column xsi:type="varchar" name="name" nullable="true" length="255" comment="Name"/>
  235. <column xsi:type="text" name="description" nullable="true" comment="Description"/>
  236. <column xsi:type="text" name="applied_rule_ids" nullable="true" comment="Applied Rule Ids"/>
  237. <column xsi:type="text" name="additional_data" nullable="true" comment="Additional Data"/>
  238. <column xsi:type="smallint" name="is_qty_decimal" unsigned="true" nullable="true" identity="false"
  239. comment="Is Qty Decimal"/>
  240. <column xsi:type="smallint" name="no_discount" unsigned="true" nullable="true" identity="false"
  241. default="0" comment="No Discount"/>
  242. <column xsi:type="decimal" name="weight" scale="4" precision="12" unsigned="false" nullable="true" default="0"
  243. comment="Weight"/>
  244. <column xsi:type="decimal" name="qty" scale="4" precision="12" unsigned="false" nullable="false" default="0"
  245. comment="Qty"/>
  246. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="false" default="0"
  247. comment="Price"/>
  248. <column xsi:type="decimal" name="base_price" scale="4" precision="12" unsigned="false" nullable="false"
  249. default="0" comment="Base Price"/>
  250. <column xsi:type="decimal" name="custom_price" scale="4" precision="12" unsigned="false" nullable="true"
  251. comment="Custom Price"/>
  252. <column xsi:type="decimal" name="discount_percent" scale="4" precision="12" unsigned="false" nullable="true"
  253. default="0" comment="Discount Percent"/>
  254. <column xsi:type="decimal" name="discount_amount" scale="4" precision="20" unsigned="false" nullable="true"
  255. default="0" comment="Discount Amount"/>
  256. <column xsi:type="decimal" name="base_discount_amount" scale="4" precision="20" unsigned="false"
  257. nullable="true" default="0" comment="Base Discount Amount"/>
  258. <column xsi:type="decimal" name="tax_percent" scale="4" precision="12" unsigned="false" nullable="true"
  259. default="0" comment="Tax Percent"/>
  260. <column xsi:type="decimal" name="tax_amount" scale="4" precision="20" unsigned="false" nullable="true"
  261. default="0" comment="Tax Amount"/>
  262. <column xsi:type="decimal" name="base_tax_amount" scale="4" precision="20" unsigned="false" nullable="true"
  263. default="0" comment="Base Tax Amount"/>
  264. <column xsi:type="decimal" name="row_total" scale="4" precision="20" unsigned="false" nullable="false"
  265. default="0" comment="Row Total"/>
  266. <column xsi:type="decimal" name="base_row_total" scale="4" precision="20" unsigned="false" nullable="false"
  267. default="0" comment="Base Row Total"/>
  268. <column xsi:type="decimal" name="row_total_with_discount" scale="4" precision="20" unsigned="false"
  269. nullable="true" default="0" comment="Row Total With Discount"/>
  270. <column xsi:type="decimal" name="row_weight" scale="4" precision="12" unsigned="false" nullable="true"
  271. default="0" comment="Row Weight"/>
  272. <column xsi:type="varchar" name="product_type" nullable="true" length="255" comment="Product Type"/>
  273. <column xsi:type="decimal" name="base_tax_before_discount" scale="4" precision="20" unsigned="false"
  274. nullable="true" comment="Base Tax Before Discount"/>
  275. <column xsi:type="decimal" name="tax_before_discount" scale="4" precision="20" unsigned="false" nullable="true"
  276. comment="Tax Before Discount"/>
  277. <column xsi:type="decimal" name="original_custom_price" scale="4" precision="12" unsigned="false"
  278. nullable="true" comment="Original Custom Price"/>
  279. <column xsi:type="varchar" name="redirect_url" nullable="true" length="255" comment="Redirect Url"/>
  280. <column xsi:type="decimal" name="base_cost" scale="4" precision="12" unsigned="false" nullable="true"
  281. comment="Base Cost"/>
  282. <column xsi:type="decimal" name="price_incl_tax" scale="4" precision="20" unsigned="false" nullable="true"
  283. comment="Price Incl Tax"/>
  284. <column xsi:type="decimal" name="base_price_incl_tax" scale="4" precision="20" unsigned="false" nullable="true"
  285. comment="Base Price Incl Tax"/>
  286. <column xsi:type="decimal" name="row_total_incl_tax" scale="4" precision="20" unsigned="false" nullable="true"
  287. comment="Row Total Incl Tax"/>
  288. <column xsi:type="decimal" name="base_row_total_incl_tax" scale="4" precision="20" unsigned="false"
  289. nullable="true" comment="Base Row Total Incl Tax"/>
  290. <column xsi:type="decimal" name="discount_tax_compensation_amount" scale="4" precision="20" unsigned="false"
  291. nullable="true" comment="Discount Tax Compensation Amount"/>
  292. <column xsi:type="decimal" name="base_discount_tax_compensation_amount" scale="4" precision="20"
  293. unsigned="false" nullable="true" comment="Base Discount Tax Compensation Amount"/>
  294. <constraint xsi:type="primary" referenceId="PRIMARY">
  295. <column name="item_id"/>
  296. </constraint>
  297. <constraint xsi:type="foreign" referenceId="QUOTE_ITEM_PARENT_ITEM_ID_QUOTE_ITEM_ITEM_ID" table="quote_item"
  298. column="parent_item_id" referenceTable="quote_item" referenceColumn="item_id" onDelete="CASCADE"/>
  299. <constraint xsi:type="foreign" referenceId="QUOTE_ITEM_QUOTE_ID_QUOTE_ENTITY_ID" table="quote_item" column="quote_id"
  300. referenceTable="quote" referenceColumn="entity_id" onDelete="CASCADE"/>
  301. <constraint xsi:type="foreign" referenceId="QUOTE_ITEM_STORE_ID_STORE_STORE_ID" table="quote_item" column="store_id"
  302. referenceTable="store" referenceColumn="store_id" onDelete="SET NULL"/>
  303. <index referenceId="QUOTE_ITEM_PARENT_ITEM_ID" indexType="btree">
  304. <column name="parent_item_id"/>
  305. </index>
  306. <index referenceId="QUOTE_ITEM_PRODUCT_ID" indexType="btree">
  307. <column name="product_id"/>
  308. </index>
  309. <index referenceId="QUOTE_ITEM_QUOTE_ID" indexType="btree">
  310. <column name="quote_id"/>
  311. </index>
  312. <index referenceId="QUOTE_ITEM_STORE_ID" indexType="btree">
  313. <column name="store_id"/>
  314. </index>
  315. </table>
  316. <table name="quote_address_item" resource="checkout" engine="innodb" comment="Sales Flat Quote Address Item">
  317. <column xsi:type="int" name="address_item_id" unsigned="true" nullable="false" identity="true"
  318. comment="Address Item ID"/>
  319. <column xsi:type="int" name="parent_item_id" unsigned="true" nullable="true" identity="false"
  320. comment="Parent Item ID"/>
  321. <column xsi:type="int" name="quote_address_id" unsigned="true" nullable="false" identity="false"
  322. default="0" comment="Quote Address ID"/>
  323. <column xsi:type="int" name="quote_item_id" unsigned="true" nullable="false" identity="false"
  324. default="0" comment="Quote Item ID"/>
  325. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  326. comment="Created At"/>
  327. <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
  328. comment="Updated At"/>
  329. <column xsi:type="text" name="applied_rule_ids" nullable="true" comment="Applied Rule Ids"/>
  330. <column xsi:type="text" name="additional_data" nullable="true" comment="Additional Data"/>
  331. <column xsi:type="decimal" name="weight" scale="4" precision="12" unsigned="false" nullable="true" default="0"
  332. comment="Weight"/>
  333. <column xsi:type="decimal" name="qty" scale="4" precision="12" unsigned="false" nullable="false" default="0"
  334. comment="Qty"/>
  335. <column xsi:type="decimal" name="discount_amount" scale="4" precision="20" unsigned="false" nullable="true"
  336. default="0" comment="Discount Amount"/>
  337. <column xsi:type="decimal" name="tax_amount" scale="4" precision="20" unsigned="false" nullable="true"
  338. default="0" comment="Tax Amount"/>
  339. <column xsi:type="decimal" name="row_total" scale="4" precision="20" unsigned="false" nullable="false"
  340. default="0" comment="Row Total"/>
  341. <column xsi:type="decimal" name="base_row_total" scale="4" precision="20" unsigned="false" nullable="false"
  342. default="0" comment="Base Row Total"/>
  343. <column xsi:type="decimal" name="row_total_with_discount" scale="4" precision="20" unsigned="false"
  344. nullable="true" default="0" comment="Row Total With Discount"/>
  345. <column xsi:type="decimal" name="base_discount_amount" scale="4" precision="20" unsigned="false"
  346. nullable="true" default="0" comment="Base Discount Amount"/>
  347. <column xsi:type="decimal" name="base_tax_amount" scale="4" precision="20" unsigned="false" nullable="true"
  348. default="0" comment="Base Tax Amount"/>
  349. <column xsi:type="decimal" name="row_weight" scale="4" precision="12" unsigned="false" nullable="true"
  350. default="0" comment="Row Weight"/>
  351. <column xsi:type="int" name="product_id" unsigned="true" nullable="true" identity="false"
  352. comment="Product ID"/>
  353. <column xsi:type="int" name="super_product_id" unsigned="true" nullable="true" identity="false"
  354. comment="Super Product ID"/>
  355. <column xsi:type="int" name="parent_product_id" unsigned="true" nullable="true" identity="false"
  356. comment="Parent Product ID"/>
  357. <column xsi:type="smallint" name="store_id" unsigned="true" nullable="true" identity="false"
  358. comment="Store ID"/>
  359. <column xsi:type="varchar" name="sku" nullable="true" length="255" comment="Sku"/>
  360. <column xsi:type="varchar" name="image" nullable="true" length="255" comment="Image"/>
  361. <column xsi:type="varchar" name="name" nullable="true" length="255" comment="Name"/>
  362. <column xsi:type="text" name="description" nullable="true" comment="Description"/>
  363. <column xsi:type="int" name="is_qty_decimal" unsigned="true" nullable="true" identity="false"
  364. comment="Is Qty Decimal"/>
  365. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
  366. comment="Price"/>
  367. <column xsi:type="decimal" name="discount_percent" scale="4" precision="12" unsigned="false" nullable="true"
  368. comment="Discount Percent"/>
  369. <column xsi:type="int" name="no_discount" unsigned="true" nullable="true" identity="false"
  370. comment="No Discount"/>
  371. <column xsi:type="decimal" name="tax_percent" scale="4" precision="12" unsigned="false" nullable="true"
  372. comment="Tax Percent"/>
  373. <column xsi:type="decimal" name="base_price" scale="4" precision="12" unsigned="false" nullable="true"
  374. comment="Base Price"/>
  375. <column xsi:type="decimal" name="base_cost" scale="4" precision="12" unsigned="false" nullable="true"
  376. comment="Base Cost"/>
  377. <column xsi:type="decimal" name="price_incl_tax" scale="4" precision="20" unsigned="false" nullable="true"
  378. comment="Price Incl Tax"/>
  379. <column xsi:type="decimal" name="base_price_incl_tax" scale="4" precision="20" unsigned="false" nullable="true"
  380. comment="Base Price Incl Tax"/>
  381. <column xsi:type="decimal" name="row_total_incl_tax" scale="4" precision="20" unsigned="false" nullable="true"
  382. comment="Row Total Incl Tax"/>
  383. <column xsi:type="decimal" name="base_row_total_incl_tax" scale="4" precision="20" unsigned="false"
  384. nullable="true" comment="Base Row Total Incl Tax"/>
  385. <column xsi:type="decimal" name="discount_tax_compensation_amount" scale="4" precision="20" unsigned="false"
  386. nullable="true" comment="Discount Tax Compensation Amount"/>
  387. <column xsi:type="decimal" name="base_discount_tax_compensation_amount" scale="4" precision="20"
  388. unsigned="false" nullable="true" comment="Base Discount Tax Compensation Amount"/>
  389. <constraint xsi:type="primary" referenceId="PRIMARY">
  390. <column name="address_item_id"/>
  391. </constraint>
  392. <constraint xsi:type="foreign" referenceId="QUOTE_ADDRESS_ITEM_QUOTE_ADDRESS_ID_QUOTE_ADDRESS_ADDRESS_ID"
  393. table="quote_address_item" column="quote_address_id" referenceTable="quote_address"
  394. referenceColumn="address_id" onDelete="CASCADE"/>
  395. <constraint xsi:type="foreign" referenceId="QUOTE_ADDR_ITEM_PARENT_ITEM_ID_QUOTE_ADDR_ITEM_ADDR_ITEM_ID"
  396. table="quote_address_item" column="parent_item_id" referenceTable="quote_address_item"
  397. referenceColumn="address_item_id" onDelete="CASCADE"/>
  398. <constraint xsi:type="foreign" referenceId="QUOTE_ADDRESS_ITEM_QUOTE_ITEM_ID_QUOTE_ITEM_ITEM_ID"
  399. table="quote_address_item" column="quote_item_id" referenceTable="quote_item"
  400. referenceColumn="item_id" onDelete="CASCADE"/>
  401. <index referenceId="QUOTE_ADDRESS_ITEM_QUOTE_ADDRESS_ID" indexType="btree">
  402. <column name="quote_address_id"/>
  403. </index>
  404. <index referenceId="QUOTE_ADDRESS_ITEM_PARENT_ITEM_ID" indexType="btree">
  405. <column name="parent_item_id"/>
  406. </index>
  407. <index referenceId="QUOTE_ADDRESS_ITEM_QUOTE_ITEM_ID" indexType="btree">
  408. <column name="quote_item_id"/>
  409. </index>
  410. <index referenceId="QUOTE_ADDRESS_ITEM_STORE_ID" indexType="btree">
  411. <column name="store_id"/>
  412. </index>
  413. </table>
  414. <table name="quote_item_option" resource="checkout" engine="innodb" comment="Sales Flat Quote Item Option">
  415. <column xsi:type="int" name="option_id" unsigned="true" nullable="false" identity="true"
  416. comment="Option ID"/>
  417. <column xsi:type="int" name="item_id" unsigned="true" nullable="false" identity="false"
  418. comment="Item ID"/>
  419. <column xsi:type="int" name="product_id" unsigned="true" nullable="false" identity="false"
  420. comment="Product ID"/>
  421. <column xsi:type="varchar" name="code" nullable="false" length="255" comment="Code"/>
  422. <column xsi:type="text" name="value" nullable="true" comment="Value"/>
  423. <constraint xsi:type="primary" referenceId="PRIMARY">
  424. <column name="option_id"/>
  425. </constraint>
  426. <constraint xsi:type="foreign" referenceId="QUOTE_ITEM_OPTION_ITEM_ID_QUOTE_ITEM_ITEM_ID" table="quote_item_option"
  427. column="item_id" referenceTable="quote_item" referenceColumn="item_id" onDelete="CASCADE"/>
  428. <index referenceId="QUOTE_ITEM_OPTION_ITEM_ID" indexType="btree">
  429. <column name="item_id"/>
  430. </index>
  431. </table>
  432. <table name="quote_payment" resource="checkout" engine="innodb" comment="Sales Flat Quote Payment">
  433. <column xsi:type="int" name="payment_id" unsigned="true" nullable="false" identity="true"
  434. comment="Payment ID"/>
  435. <column xsi:type="int" name="quote_id" unsigned="true" nullable="false" identity="false"
  436. default="0" comment="Quote ID"/>
  437. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  438. comment="Created At"/>
  439. <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
  440. comment="Updated At"/>
  441. <column xsi:type="varchar" name="method" nullable="true" length="255" comment="Method"/>
  442. <column xsi:type="varchar" name="cc_type" nullable="true" length="255" comment="Cc Type"/>
  443. <column xsi:type="varchar" name="cc_number_enc" nullable="true" length="255" comment="Cc Number Enc"/>
  444. <column xsi:type="varchar" name="cc_last_4" nullable="true" length="255" comment="Cc Last 4"/>
  445. <column xsi:type="varchar" name="cc_cid_enc" nullable="true" length="255" comment="Cc Cid Enc"/>
  446. <column xsi:type="varchar" name="cc_owner" nullable="true" length="255" comment="Cc Owner"/>
  447. <column xsi:type="varchar" name="cc_exp_month" nullable="true" length="255" comment="Cc Exp Month"/>
  448. <column xsi:type="smallint" name="cc_exp_year" unsigned="true" nullable="true" identity="false"
  449. default="0" comment="Cc Exp Year"/>
  450. <column xsi:type="varchar" name="cc_ss_owner" nullable="true" length="255" comment="Cc Ss Owner"/>
  451. <column xsi:type="smallint" name="cc_ss_start_month" unsigned="true" nullable="true"
  452. identity="false" default="0" comment="Cc Ss Start Month"/>
  453. <column xsi:type="smallint" name="cc_ss_start_year" unsigned="true" nullable="true" identity="false"
  454. default="0" comment="Cc Ss Start Year"/>
  455. <column xsi:type="varchar" name="po_number" nullable="true" length="255" comment="Po Number"/>
  456. <column xsi:type="text" name="additional_data" nullable="true" comment="Additional Data"/>
  457. <column xsi:type="varchar" name="cc_ss_issue" nullable="true" length="255" comment="Cc Ss Issue"/>
  458. <column xsi:type="text" name="additional_information" nullable="true" comment="Additional Information"/>
  459. <constraint xsi:type="primary" referenceId="PRIMARY">
  460. <column name="payment_id"/>
  461. </constraint>
  462. <constraint xsi:type="foreign" referenceId="QUOTE_PAYMENT_QUOTE_ID_QUOTE_ENTITY_ID" table="quote_payment"
  463. column="quote_id" referenceTable="quote" referenceColumn="entity_id" onDelete="CASCADE"/>
  464. <index referenceId="QUOTE_PAYMENT_QUOTE_ID" indexType="btree">
  465. <column name="quote_id"/>
  466. </index>
  467. </table>
  468. <table name="quote_shipping_rate" resource="checkout" engine="innodb" comment="Sales Flat Quote Shipping Rate">
  469. <column xsi:type="int" name="rate_id" unsigned="true" nullable="false" identity="true"
  470. comment="Rate ID"/>
  471. <column xsi:type="int" name="address_id" unsigned="true" nullable="false" identity="false"
  472. default="0" comment="Address ID"/>
  473. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  474. comment="Created At"/>
  475. <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
  476. comment="Updated At"/>
  477. <column xsi:type="varchar" name="carrier" nullable="true" length="255" comment="Carrier"/>
  478. <column xsi:type="varchar" name="carrier_title" nullable="true" length="255" comment="Carrier Title"/>
  479. <column xsi:type="varchar" name="code" nullable="true" length="255" comment="Code"/>
  480. <column xsi:type="varchar" name="method" nullable="true" length="255" comment="Method"/>
  481. <column xsi:type="text" name="method_description" nullable="true" comment="Method Description"/>
  482. <column xsi:type="decimal" name="price" scale="4" precision="20" unsigned="false" nullable="false" default="0"
  483. comment="Price"/>
  484. <column xsi:type="text" name="error_message" nullable="true" comment="Error Message"/>
  485. <column xsi:type="text" name="method_title" nullable="true" comment="Method Title"/>
  486. <constraint xsi:type="primary" referenceId="PRIMARY">
  487. <column name="rate_id"/>
  488. </constraint>
  489. <constraint xsi:type="foreign" referenceId="QUOTE_SHIPPING_RATE_ADDRESS_ID_QUOTE_ADDRESS_ADDRESS_ID"
  490. table="quote_shipping_rate" column="address_id" referenceTable="quote_address"
  491. referenceColumn="address_id" onDelete="CASCADE"/>
  492. <index referenceId="QUOTE_SHIPPING_RATE_ADDRESS_ID" indexType="btree">
  493. <column name="address_id"/>
  494. </index>
  495. </table>
  496. <table name="quote_id_mask" resource="checkout" engine="innodb" comment="Quote ID and masked ID mapping">
  497. <column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="true"
  498. comment="Entity ID"/>
  499. <column xsi:type="int" name="quote_id" unsigned="true" nullable="false" identity="false"
  500. comment="Quote ID"/>
  501. <column xsi:type="varchar" name="masked_id" nullable="true" length="32" comment="Masked ID"/>
  502. <constraint xsi:type="primary" referenceId="PRIMARY">
  503. <column name="entity_id"/>
  504. <column name="quote_id"/>
  505. </constraint>
  506. <constraint xsi:type="foreign" referenceId="QUOTE_ID_MASK_QUOTE_ID_QUOTE_ENTITY_ID" table="quote_id_mask"
  507. column="quote_id" referenceTable="quote" referenceColumn="entity_id" onDelete="CASCADE"/>
  508. <index referenceId="QUOTE_ID_MASK_QUOTE_ID" indexType="btree">
  509. <column name="quote_id"/>
  510. </index>
  511. <index referenceId="QUOTE_ID_MASK_MASKED_ID" indexType="btree">
  512. <column name="masked_id"/>
  513. </index>
  514. </table>
  515. </schema>