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