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
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
<?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="eav_entity_type" resource="default" engine="innodb" comment="Eav Entity Type">
<column xsi:type="smallint" name="entity_type_id" padding="5" unsigned="true" nullable="false" identity="true"
comment="Entity Type Id"/>
<column xsi:type="varchar" name="entity_type_code" nullable="false" length="50" comment="Entity Type Code"/>
<column xsi:type="varchar" name="entity_model" nullable="false" length="255" comment="Entity Model"/>
<column xsi:type="varchar" name="attribute_model" nullable="true" length="255" comment="Attribute Model"/>
<column xsi:type="varchar" name="entity_table" nullable="true" length="255" comment="Entity Table"/>
<column xsi:type="varchar" name="value_table_prefix" nullable="true" length="255" comment="Value Table Prefix"/>
<column xsi:type="varchar" name="entity_id_field" nullable="true" length="255" comment="Entity ID Field"/>
<column xsi:type="smallint" name="is_data_sharing" padding="5" unsigned="true" nullable="false" identity="false"
default="1" comment="Defines Is Data Sharing"/>
<column xsi:type="varchar" name="data_sharing_key" nullable="true" length="100" default="default"
comment="Data Sharing Key"/>
<column xsi:type="smallint" name="default_attribute_set_id" padding="5" unsigned="true" nullable="false"
identity="false" default="0" comment="Default Attribute Set Id"/>
<column xsi:type="varchar" name="increment_model" nullable="true" length="255" comment="Increment Model"/>
<column xsi:type="smallint" name="increment_per_store" padding="5" unsigned="true" nullable="false"
identity="false" default="0" comment="Increment Per Store"/>
<column xsi:type="smallint" name="increment_pad_length" padding="5" unsigned="true" nullable="false"
identity="false" default="8" comment="Increment Pad Length"/>
<column xsi:type="varchar" name="increment_pad_char" nullable="false" length="1" default="0"
comment="Increment Pad Char"/>
<column xsi:type="varchar" name="additional_attribute_table" nullable="true" length="255"
comment="Additional Attribute Table"/>
<column xsi:type="varchar" name="entity_attribute_collection" nullable="true" length="255"
comment="Entity Attribute Collection"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="entity_type_id"/>
</constraint>
<index referenceId="EAV_ENTITY_TYPE_ENTITY_TYPE_CODE" indexType="btree">
<column name="entity_type_code"/>
</index>
</table>
<table name="eav_entity" resource="default" engine="innodb" comment="Eav Entity">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
comment="Entity ID"/>
<column xsi:type="smallint" name="entity_type_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Entity Type Id"/>
<column xsi:type="smallint" name="attribute_set_id" padding="5" unsigned="true" nullable="false"
identity="false" default="0" comment="Attribute Set Id"/>
<column xsi:type="varchar" name="increment_id" nullable="true" length="50" comment="Increment Id"/>
<column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
default="0" comment="Parent Id"/>
<column xsi:type="smallint" name="store_id" padding="5" 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"
comment="Updated At"/>
<column xsi:type="smallint" name="is_active" padding="5" unsigned="true" nullable="false" identity="false"
default="1" comment="Defines Is Entity Active"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="entity_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID"
table="eav_entity" column="entity_type_id" referenceTable="eav_entity_type"
referenceColumn="entity_type_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_STORE_ID_STORE_STORE_ID" table="eav_entity" column="store_id"
referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
<index referenceId="EAV_ENTITY_ENTITY_TYPE_ID" indexType="btree">
<column name="entity_type_id"/>
</index>
<index referenceId="EAV_ENTITY_STORE_ID" indexType="btree">
<column name="store_id"/>
</index>
</table>
<table name="eav_entity_datetime" resource="default" engine="innodb" comment="Eav Entity Value Prefix">
<column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
comment="Value Id"/>
<column xsi:type="smallint" name="entity_type_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Entity Type Id"/>
<column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Attribute Id"/>
<column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Store Id"/>
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
default="0" comment="Entity ID"/>
<column xsi:type="datetime" name="value" on_update="false" nullable="true" comment="Attribute Value"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="value_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_DATETIME_ENTITY_ID_EAV_ENTITY_ENTITY_ID"
table="eav_entity_datetime" column="entity_id" referenceTable="eav_entity"
referenceColumn="entity_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_ENTT_DTIME_ENTT_TYPE_ID_EAV_ENTT_TYPE_ENTT_TYPE_ID"
table="eav_entity_datetime" column="entity_type_id" referenceTable="eav_entity_type"
referenceColumn="entity_type_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_DATETIME_STORE_ID_STORE_STORE_ID" table="eav_entity_datetime"
column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
<constraint xsi:type="unique" referenceId="EAV_ENTITY_DATETIME_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
<column name="entity_id"/>
<column name="attribute_id"/>
<column name="store_id"/>
</constraint>
<index referenceId="EAV_ENTITY_DATETIME_STORE_ID" indexType="btree">
<column name="store_id"/>
</index>
<index referenceId="EAV_ENTITY_DATETIME_ATTRIBUTE_ID_VALUE" indexType="btree">
<column name="attribute_id"/>
<column name="value"/>
</index>
<index referenceId="EAV_ENTITY_DATETIME_ENTITY_TYPE_ID_VALUE" indexType="btree">
<column name="entity_type_id"/>
<column name="value"/>
</index>
</table>
<table name="eav_entity_decimal" resource="default" engine="innodb" comment="Eav Entity Value Prefix">
<column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
comment="Value Id"/>
<column xsi:type="smallint" name="entity_type_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Entity Type Id"/>
<column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Attribute Id"/>
<column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Store Id"/>
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
default="0" comment="Entity ID"/>
<column xsi:type="decimal" name="value" scale="4" precision="12" unsigned="false" nullable="false" default="0"
comment="Attribute Value"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="value_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_DECIMAL_ENTITY_ID_EAV_ENTITY_ENTITY_ID"
table="eav_entity_decimal" column="entity_id" referenceTable="eav_entity"
referenceColumn="entity_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_DECIMAL_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID"
table="eav_entity_decimal" column="entity_type_id" referenceTable="eav_entity_type"
referenceColumn="entity_type_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_DECIMAL_STORE_ID_STORE_STORE_ID" table="eav_entity_decimal"
column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
<constraint xsi:type="unique" referenceId="EAV_ENTITY_DECIMAL_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
<column name="entity_id"/>
<column name="attribute_id"/>
<column name="store_id"/>
</constraint>
<index referenceId="EAV_ENTITY_DECIMAL_STORE_ID" indexType="btree">
<column name="store_id"/>
</index>
<index referenceId="EAV_ENTITY_DECIMAL_ATTRIBUTE_ID_VALUE" indexType="btree">
<column name="attribute_id"/>
<column name="value"/>
</index>
<index referenceId="EAV_ENTITY_DECIMAL_ENTITY_TYPE_ID_VALUE" indexType="btree">
<column name="entity_type_id"/>
<column name="value"/>
</index>
</table>
<table name="eav_entity_int" resource="default" engine="innodb" comment="Eav Entity Value Prefix">
<column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
comment="Value Id"/>
<column xsi:type="smallint" name="entity_type_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Entity Type Id"/>
<column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Attribute Id"/>
<column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Store Id"/>
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
default="0" comment="Entity ID"/>
<column xsi:type="int" name="value" padding="11" unsigned="false" nullable="false" identity="false" default="0"
comment="Attribute Value"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="value_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_INT_ENTITY_ID_EAV_ENTITY_ENTITY_ID" table="eav_entity_int"
column="entity_id" referenceTable="eav_entity" referenceColumn="entity_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_INT_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID"
table="eav_entity_int" column="entity_type_id" referenceTable="eav_entity_type"
referenceColumn="entity_type_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_INT_STORE_ID_STORE_STORE_ID" table="eav_entity_int"
column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
<constraint xsi:type="unique" referenceId="EAV_ENTITY_INT_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
<column name="entity_id"/>
<column name="attribute_id"/>
<column name="store_id"/>
</constraint>
<index referenceId="EAV_ENTITY_INT_STORE_ID" indexType="btree">
<column name="store_id"/>
</index>
<index referenceId="EAV_ENTITY_INT_ATTRIBUTE_ID_VALUE" indexType="btree">
<column name="attribute_id"/>
<column name="value"/>
</index>
<index referenceId="EAV_ENTITY_INT_ENTITY_TYPE_ID_VALUE" indexType="btree">
<column name="entity_type_id"/>
<column name="value"/>
</index>
</table>
<table name="eav_entity_text" resource="default" engine="innodb" comment="Eav Entity Value Prefix">
<column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
comment="Value Id"/>
<column xsi:type="smallint" name="entity_type_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Entity Type Id"/>
<column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Attribute Id"/>
<column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Store Id"/>
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
default="0" comment="Entity ID"/>
<column xsi:type="text" name="value" nullable="false" comment="Attribute Value"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="value_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_TEXT_ENTITY_ID_EAV_ENTITY_ENTITY_ID" table="eav_entity_text"
column="entity_id" referenceTable="eav_entity" referenceColumn="entity_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_TEXT_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID"
table="eav_entity_text" column="entity_type_id" referenceTable="eav_entity_type"
referenceColumn="entity_type_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_TEXT_STORE_ID_STORE_STORE_ID" table="eav_entity_text"
column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
<constraint xsi:type="unique" referenceId="EAV_ENTITY_TEXT_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
<column name="entity_id"/>
<column name="attribute_id"/>
<column name="store_id"/>
</constraint>
<index referenceId="EAV_ENTITY_TEXT_ENTITY_TYPE_ID" indexType="btree">
<column name="entity_type_id"/>
</index>
<index referenceId="EAV_ENTITY_TEXT_ATTRIBUTE_ID" indexType="btree">
<column name="attribute_id"/>
</index>
<index referenceId="EAV_ENTITY_TEXT_STORE_ID" indexType="btree">
<column name="store_id"/>
</index>
</table>
<table name="eav_entity_varchar" resource="default" engine="innodb" comment="Eav Entity Value Prefix">
<column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"
comment="Value Id"/>
<column xsi:type="smallint" name="entity_type_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Entity Type Id"/>
<column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Attribute Id"/>
<column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Store Id"/>
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
default="0" comment="Entity ID"/>
<column xsi:type="varchar" name="value" nullable="true" length="255" comment="Attribute Value"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="value_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_VARCHAR_ENTITY_ID_EAV_ENTITY_ENTITY_ID"
table="eav_entity_varchar" column="entity_id" referenceTable="eav_entity"
referenceColumn="entity_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_VARCHAR_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID"
table="eav_entity_varchar" column="entity_type_id" referenceTable="eav_entity_type"
referenceColumn="entity_type_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_VARCHAR_STORE_ID_STORE_STORE_ID" table="eav_entity_varchar"
column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
<constraint xsi:type="unique" referenceId="EAV_ENTITY_VARCHAR_ENTITY_ID_ATTRIBUTE_ID_STORE_ID">
<column name="entity_id"/>
<column name="attribute_id"/>
<column name="store_id"/>
</constraint>
<index referenceId="EAV_ENTITY_VARCHAR_STORE_ID" indexType="btree">
<column name="store_id"/>
</index>
<index referenceId="EAV_ENTITY_VARCHAR_ATTRIBUTE_ID_VALUE" indexType="btree">
<column name="attribute_id"/>
<column name="value"/>
</index>
<index referenceId="EAV_ENTITY_VARCHAR_ENTITY_TYPE_ID_VALUE" indexType="btree">
<column name="entity_type_id"/>
<column name="value"/>
</index>
</table>
<table name="eav_attribute" resource="default" engine="innodb" comment="Eav Attribute">
<column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="true"
comment="Attribute Id"/>
<column xsi:type="smallint" name="entity_type_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Entity Type Id"/>
<column xsi:type="varchar" name="attribute_code" nullable="false" length="255" comment="Attribute Code"/>
<column xsi:type="varchar" name="attribute_model" nullable="true" length="255" comment="Attribute Model"/>
<column xsi:type="varchar" name="backend_model" nullable="true" length="255" comment="Backend Model"/>
<column xsi:type="varchar" name="backend_type" nullable="false" length="8" default="static"
comment="Backend Type"/>
<column xsi:type="varchar" name="backend_table" nullable="true" length="255" comment="Backend Table"/>
<column xsi:type="varchar" name="frontend_model" nullable="true" length="255" comment="Frontend Model"/>
<column xsi:type="varchar" name="frontend_input" nullable="true" length="50" comment="Frontend Input"/>
<column xsi:type="varchar" name="frontend_label" nullable="true" length="255" comment="Frontend Label"/>
<column xsi:type="varchar" name="frontend_class" nullable="true" length="255" comment="Frontend Class"/>
<column xsi:type="varchar" name="source_model" nullable="true" length="255" comment="Source Model"/>
<column xsi:type="smallint" name="is_required" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Defines Is Required"/>
<column xsi:type="smallint" name="is_user_defined" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Defines Is User Defined"/>
<column xsi:type="text" name="default_value" nullable="true" comment="Default Value"/>
<column xsi:type="smallint" name="is_unique" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Defines Is Unique"/>
<column xsi:type="varchar" name="note" nullable="true" length="255" comment="Note"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="attribute_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_ATTRIBUTE_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID"
table="eav_attribute" column="entity_type_id" referenceTable="eav_entity_type"
referenceColumn="entity_type_id" onDelete="CASCADE"/>
<constraint xsi:type="unique" referenceId="EAV_ATTRIBUTE_ENTITY_TYPE_ID_ATTRIBUTE_CODE">
<column name="entity_type_id"/>
<column name="attribute_code"/>
</constraint>
</table>
<table name="eav_entity_store" resource="default" engine="innodb" comment="Eav Entity Store">
<column xsi:type="int" name="entity_store_id" padding="10" unsigned="true" nullable="false" identity="true"
comment="Entity Store Id"/>
<column xsi:type="smallint" name="entity_type_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Entity Type Id"/>
<column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Store Id"/>
<column xsi:type="varchar" name="increment_prefix" nullable="true" length="20" comment="Increment Prefix"/>
<column xsi:type="varchar" name="increment_last_id" nullable="true" length="50" comment="Last Incremented Id"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="entity_store_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_STORE_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID"
table="eav_entity_store" column="entity_type_id" referenceTable="eav_entity_type"
referenceColumn="entity_type_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_STORE_STORE_ID_STORE_STORE_ID" table="eav_entity_store"
column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
<index referenceId="EAV_ENTITY_STORE_ENTITY_TYPE_ID" indexType="btree">
<column name="entity_type_id"/>
</index>
<index referenceId="EAV_ENTITY_STORE_STORE_ID" indexType="btree">
<column name="store_id"/>
</index>
</table>
<table name="eav_attribute_set" resource="default" engine="innodb" comment="Eav Attribute Set">
<column xsi:type="smallint" name="attribute_set_id" padding="5" unsigned="true" nullable="false" identity="true"
comment="Attribute Set Id"/>
<column xsi:type="smallint" name="entity_type_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Entity Type Id"/>
<column xsi:type="varchar" name="attribute_set_name" nullable="true" length="255" comment="Attribute Set Name"/>
<column xsi:type="smallint" name="sort_order" padding="6" unsigned="false" nullable="false" identity="false"
default="0" comment="Sort Order"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="attribute_set_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_ATTRIBUTE_SET_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID"
table="eav_attribute_set" column="entity_type_id" referenceTable="eav_entity_type"
referenceColumn="entity_type_id" onDelete="CASCADE"/>
<constraint xsi:type="unique" referenceId="EAV_ATTRIBUTE_SET_ENTITY_TYPE_ID_ATTRIBUTE_SET_NAME">
<column name="entity_type_id"/>
<column name="attribute_set_name"/>
</constraint>
<index referenceId="EAV_ATTRIBUTE_SET_ENTITY_TYPE_ID_SORT_ORDER" indexType="btree">
<column name="entity_type_id"/>
<column name="sort_order"/>
</index>
</table>
<table name="eav_attribute_group" resource="default" engine="innodb" comment="Eav Attribute Group">
<column xsi:type="smallint" name="attribute_group_id" padding="5" unsigned="true" nullable="false"
identity="true" comment="Attribute Group Id"/>
<column xsi:type="smallint" name="attribute_set_id" padding="5" unsigned="true" nullable="false"
identity="false" default="0" comment="Attribute Set Id"/>
<column xsi:type="varchar" name="attribute_group_name" nullable="true" length="255"
comment="Attribute Group Name"/>
<column xsi:type="smallint" name="sort_order" padding="6" unsigned="false" nullable="false" identity="false"
default="0" comment="Sort Order"/>
<column xsi:type="smallint" name="default_id" padding="5" unsigned="true" nullable="true" identity="false"
default="0" comment="Default Id"/>
<column xsi:type="varchar" name="attribute_group_code" nullable="false" length="255"
comment="Attribute Group Code"/>
<column xsi:type="varchar" name="tab_group_code" nullable="true" length="255" comment="Tab Group Code"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="attribute_group_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_ATTR_GROUP_ATTR_SET_ID_EAV_ATTR_SET_ATTR_SET_ID"
table="eav_attribute_group" column="attribute_set_id" referenceTable="eav_attribute_set"
referenceColumn="attribute_set_id" onDelete="CASCADE"/>
<constraint xsi:type="unique" referenceId="EAV_ATTRIBUTE_GROUP_ATTRIBUTE_SET_ID_ATTRIBUTE_GROUP_NAME">
<column name="attribute_set_id"/>
<column name="attribute_group_name"/>
</constraint>
<constraint xsi:type="unique" referenceId="EAV_ATTRIBUTE_GROUP_ATTRIBUTE_SET_ID_ATTRIBUTE_GROUP_CODE">
<column name="attribute_set_id"/>
<column name="attribute_group_code"/>
</constraint>
<index referenceId="EAV_ATTRIBUTE_GROUP_ATTRIBUTE_SET_ID_SORT_ORDER" indexType="btree">
<column name="attribute_set_id"/>
<column name="sort_order"/>
</index>
</table>
<table name="eav_entity_attribute" resource="default" engine="innodb" comment="Eav Entity Attributes">
<column xsi:type="int" name="entity_attribute_id" padding="10" unsigned="true" nullable="false" identity="true"
comment="Entity Attribute Id"/>
<column xsi:type="smallint" name="entity_type_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Entity Type Id"/>
<column xsi:type="smallint" name="attribute_set_id" padding="5" unsigned="true" nullable="false"
identity="false" default="0" comment="Attribute Set Id"/>
<column xsi:type="smallint" name="attribute_group_id" padding="5" unsigned="true" nullable="false"
identity="false" default="0" comment="Attribute Group Id"/>
<column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Attribute Id"/>
<column xsi:type="smallint" name="sort_order" padding="6" unsigned="false" nullable="false" identity="false"
default="0" comment="Sort Order"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="entity_attribute_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID"
table="eav_entity_attribute" column="attribute_id" referenceTable="eav_attribute"
referenceColumn="attribute_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_ENTT_ATTR_ATTR_GROUP_ID_EAV_ATTR_GROUP_ATTR_GROUP_ID"
table="eav_entity_attribute" column="attribute_group_id" referenceTable="eav_attribute_group"
referenceColumn="attribute_group_id" onDelete="CASCADE"/>
<constraint xsi:type="unique" referenceId="EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_SET_ID_ATTRIBUTE_ID">
<column name="attribute_set_id"/>
<column name="attribute_id"/>
</constraint>
<constraint xsi:type="unique" referenceId="EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_GROUP_ID_ATTRIBUTE_ID">
<column name="attribute_group_id"/>
<column name="attribute_id"/>
</constraint>
<index referenceId="EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_SET_ID_SORT_ORDER" indexType="btree">
<column name="attribute_set_id"/>
<column name="sort_order"/>
</index>
<index referenceId="EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_ID" indexType="btree">
<column name="attribute_id"/>
</index>
</table>
<table name="eav_attribute_option" resource="default" engine="innodb" comment="Eav Attribute Option">
<column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="true"
comment="Option Id"/>
<column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Attribute Id"/>
<column xsi:type="smallint" name="sort_order" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Sort Order"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="option_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_ATTRIBUTE_OPTION_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID"
table="eav_attribute_option" column="attribute_id" referenceTable="eav_attribute"
referenceColumn="attribute_id" onDelete="CASCADE"/>
<index referenceId="EAV_ATTRIBUTE_OPTION_ATTRIBUTE_ID" indexType="btree">
<column name="attribute_id"/>
</index>
</table>
<table name="eav_attribute_option_value" resource="default" engine="innodb" comment="Eav Attribute Option Value">
<column xsi:type="int" name="value_id" padding="10" unsigned="true" nullable="false" identity="true"
comment="Value Id"/>
<column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="false"
default="0" comment="Option Id"/>
<column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Store Id"/>
<column xsi:type="varchar" name="value" nullable="true" length="255" comment="Value"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="value_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_ATTR_OPT_VAL_OPT_ID_EAV_ATTR_OPT_OPT_ID"
table="eav_attribute_option_value" column="option_id" referenceTable="eav_attribute_option"
referenceColumn="option_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_ATTRIBUTE_OPTION_VALUE_STORE_ID_STORE_STORE_ID"
table="eav_attribute_option_value" column="store_id" referenceTable="store"
referenceColumn="store_id" onDelete="CASCADE"/>
<index referenceId="EAV_ATTRIBUTE_OPTION_VALUE_OPTION_ID" indexType="btree">
<column name="option_id"/>
</index>
<index referenceId="EAV_ATTRIBUTE_OPTION_VALUE_STORE_ID" indexType="btree">
<column name="store_id"/>
</index>
</table>
<table name="eav_attribute_label" resource="default" engine="innodb" comment="Eav Attribute Label">
<column xsi:type="int" name="attribute_label_id" padding="10" unsigned="true" nullable="false" identity="true"
comment="Attribute Label Id"/>
<column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Attribute Id"/>
<column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Store Id"/>
<column xsi:type="varchar" name="value" nullable="true" length="255" comment="Value"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="attribute_label_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_ATTRIBUTE_LABEL_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID"
table="eav_attribute_label" column="attribute_id" referenceTable="eav_attribute"
referenceColumn="attribute_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_ATTRIBUTE_LABEL_STORE_ID_STORE_STORE_ID" table="eav_attribute_label"
column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
<index referenceId="EAV_ATTRIBUTE_LABEL_STORE_ID" indexType="btree">
<column name="store_id"/>
</index>
<index referenceId="EAV_ATTRIBUTE_LABEL_ATTRIBUTE_ID_STORE_ID" indexType="btree">
<column name="attribute_id"/>
<column name="store_id"/>
</index>
</table>
<table name="eav_form_type" resource="default" engine="innodb" comment="Eav Form Type">
<column xsi:type="smallint" name="type_id" padding="5" unsigned="true" nullable="false" identity="true"
comment="Type Id"/>
<column xsi:type="varchar" name="code" nullable="false" length="64" comment="Code"/>
<column xsi:type="varchar" name="label" nullable="false" length="255" comment="Label"/>
<column xsi:type="smallint" name="is_system" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Is System"/>
<column xsi:type="varchar" name="theme" nullable="true" length="64" comment="Theme"/>
<column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Store Id"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="type_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_FORM_TYPE_STORE_ID_STORE_STORE_ID" table="eav_form_type"
column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
<constraint xsi:type="unique" referenceId="EAV_FORM_TYPE_CODE_THEME_STORE_ID">
<column name="code"/>
<column name="theme"/>
<column name="store_id"/>
</constraint>
<index referenceId="EAV_FORM_TYPE_STORE_ID" indexType="btree">
<column name="store_id"/>
</index>
</table>
<table name="eav_form_type_entity" resource="default" engine="innodb" comment="Eav Form Type Entity">
<column xsi:type="smallint" name="type_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Type Id"/>
<column xsi:type="smallint" name="entity_type_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Entity Type Id"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="type_id"/>
<column name="entity_type_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_FORM_TYPE_ENTT_ENTT_TYPE_ID_EAV_ENTT_TYPE_ENTT_TYPE_ID"
table="eav_form_type_entity" column="entity_type_id" referenceTable="eav_entity_type"
referenceColumn="entity_type_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_FORM_TYPE_ENTITY_TYPE_ID_EAV_FORM_TYPE_TYPE_ID"
table="eav_form_type_entity" column="type_id" referenceTable="eav_form_type"
referenceColumn="type_id" onDelete="CASCADE"/>
<index referenceId="EAV_FORM_TYPE_ENTITY_ENTITY_TYPE_ID" indexType="btree">
<column name="entity_type_id"/>
</index>
</table>
<table name="eav_form_fieldset" resource="default" engine="innodb" comment="Eav Form Fieldset">
<column xsi:type="smallint" name="fieldset_id" padding="5" unsigned="true" nullable="false" identity="true"
comment="Fieldset Id"/>
<column xsi:type="smallint" name="type_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Type Id"/>
<column xsi:type="varchar" name="code" nullable="false" length="64" comment="Code"/>
<column xsi:type="int" name="sort_order" padding="11" unsigned="false" nullable="false" identity="false"
default="0" comment="Sort Order"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="fieldset_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_FORM_FIELDSET_TYPE_ID_EAV_FORM_TYPE_TYPE_ID" table="eav_form_fieldset"
column="type_id" referenceTable="eav_form_type" referenceColumn="type_id" onDelete="CASCADE"/>
<constraint xsi:type="unique" referenceId="EAV_FORM_FIELDSET_TYPE_ID_CODE">
<column name="type_id"/>
<column name="code"/>
</constraint>
</table>
<table name="eav_form_fieldset_label" resource="default" engine="innodb" comment="Eav Form Fieldset Label">
<column xsi:type="smallint" name="fieldset_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Fieldset Id"/>
<column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Store Id"/>
<column xsi:type="varchar" name="label" nullable="false" length="255" comment="Label"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="fieldset_id"/>
<column name="store_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_FORM_FSET_LBL_FSET_ID_EAV_FORM_FSET_FSET_ID"
table="eav_form_fieldset_label" column="fieldset_id" referenceTable="eav_form_fieldset"
referenceColumn="fieldset_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_FORM_FIELDSET_LABEL_STORE_ID_STORE_STORE_ID"
table="eav_form_fieldset_label" column="store_id" referenceTable="store" referenceColumn="store_id"
onDelete="CASCADE"/>
<index referenceId="EAV_FORM_FIELDSET_LABEL_STORE_ID" indexType="btree">
<column name="store_id"/>
</index>
</table>
<table name="eav_form_element" resource="default" engine="innodb" comment="Eav Form Element">
<column xsi:type="int" name="element_id" padding="10" unsigned="true" nullable="false" identity="true"
comment="Element Id"/>
<column xsi:type="smallint" name="type_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Type Id"/>
<column xsi:type="smallint" name="fieldset_id" padding="5" unsigned="true" nullable="true" identity="false"
comment="Fieldset Id"/>
<column xsi:type="smallint" name="attribute_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Attribute Id"/>
<column xsi:type="int" name="sort_order" padding="11" unsigned="false" nullable="false" identity="false"
default="0" comment="Sort Order"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="element_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="EAV_FORM_ELEMENT_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID"
table="eav_form_element" column="attribute_id" referenceTable="eav_attribute"
referenceColumn="attribute_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_FORM_ELEMENT_FIELDSET_ID_EAV_FORM_FIELDSET_FIELDSET_ID"
table="eav_form_element" column="fieldset_id" referenceTable="eav_form_fieldset"
referenceColumn="fieldset_id" onDelete="SET NULL"/>
<constraint xsi:type="foreign" referenceId="EAV_FORM_ELEMENT_TYPE_ID_EAV_FORM_TYPE_TYPE_ID" table="eav_form_element"
column="type_id" referenceTable="eav_form_type" referenceColumn="type_id" onDelete="CASCADE"/>
<constraint xsi:type="unique" referenceId="EAV_FORM_ELEMENT_TYPE_ID_ATTRIBUTE_ID">
<column name="type_id"/>
<column name="attribute_id"/>
</constraint>
<index referenceId="EAV_FORM_ELEMENT_FIELDSET_ID" indexType="btree">
<column name="fieldset_id"/>
</index>
<index referenceId="EAV_FORM_ELEMENT_ATTRIBUTE_ID" indexType="btree">
<column name="attribute_id"/>
</index>
</table>
</schema>