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
<?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="catalog_product_bundle_option" resource="default" engine="innodb"
comment="Catalog Product Bundle Option">
<column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="true"
comment="Option Id"/>
<column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Parent Id"/>
<column xsi:type="smallint" name="required" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Required"/>
<column xsi:type="int" name="position" padding="10" unsigned="true" nullable="false" identity="false"
default="0" comment="Position"/>
<column xsi:type="varchar" name="type" nullable="true" length="255" comment="Type"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="option_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="CAT_PRD_BNDL_OPT_PARENT_ID_CAT_PRD_ENTT_ENTT_ID"
table="catalog_product_bundle_option" column="parent_id" referenceTable="catalog_product_entity"
referenceColumn="entity_id" onDelete="CASCADE"/>
<index referenceId="CATALOG_PRODUCT_BUNDLE_OPTION_PARENT_ID" indexType="btree">
<column name="parent_id"/>
</index>
</table>
<table name="catalog_product_bundle_option_value" resource="default" engine="innodb"
comment="Catalog Product Bundle 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"
comment="Option Id"/>
<column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Store Id"/>
<column xsi:type="varchar" name="title" nullable="true" length="255" comment="Title"/>
<column xsi:type="int" name="parent_product_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Parent Product Id"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="value_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="CAT_PRD_BNDL_OPT_VAL_OPT_ID_CAT_PRD_BNDL_OPT_OPT_ID"
table="catalog_product_bundle_option_value" column="option_id"
referenceTable="catalog_product_bundle_option" referenceColumn="option_id" onDelete="CASCADE"/>
<constraint xsi:type="unique" referenceId="CAT_PRD_BNDL_OPT_VAL_OPT_ID_PARENT_PRD_ID_STORE_ID">
<column name="option_id"/>
<column name="parent_product_id"/>
<column name="store_id"/>
</constraint>
</table>
<table name="catalog_product_bundle_selection" resource="default" engine="innodb"
comment="Catalog Product Bundle Selection">
<column xsi:type="int" name="selection_id" padding="10" unsigned="true" nullable="false" identity="true"
comment="Selection Id"/>
<column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Option Id"/>
<column xsi:type="int" name="parent_product_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Parent Product Id"/>
<column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Product Id"/>
<column xsi:type="int" name="position" padding="10" unsigned="true" nullable="false" identity="false"
default="0" comment="Position"/>
<column xsi:type="smallint" name="is_default" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Is Default"/>
<column xsi:type="smallint" name="selection_price_type" padding="5" unsigned="true" nullable="false"
identity="false" default="0" comment="Selection Price Type"/>
<column xsi:type="decimal" name="selection_price_value" scale="4" precision="12" unsigned="false"
nullable="false" default="0" comment="Selection Price Value"/>
<column xsi:type="decimal" name="selection_qty" scale="4" precision="12" unsigned="false" nullable="true"
comment="Selection Qty"/>
<column xsi:type="smallint" name="selection_can_change_qty" padding="6" unsigned="false" nullable="false"
identity="false" default="0" comment="Selection Can Change Qty"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="selection_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="CAT_PRD_BNDL_SELECTION_OPT_ID_CAT_PRD_BNDL_OPT_OPT_ID"
table="catalog_product_bundle_selection" column="option_id"
referenceTable="catalog_product_bundle_option" referenceColumn="option_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="CAT_PRD_BNDL_SELECTION_PRD_ID_CAT_PRD_ENTT_ENTT_ID"
table="catalog_product_bundle_selection" column="product_id" referenceTable="catalog_product_entity"
referenceColumn="entity_id" onDelete="CASCADE"/>
<index referenceId="CATALOG_PRODUCT_BUNDLE_SELECTION_OPTION_ID" indexType="btree">
<column name="option_id"/>
</index>
<index referenceId="CATALOG_PRODUCT_BUNDLE_SELECTION_PRODUCT_ID" indexType="btree">
<column name="product_id"/>
</index>
</table>
<table name="catalog_product_bundle_selection_price" resource="default" engine="innodb"
comment="Catalog Product Bundle Selection Price">
<column xsi:type="int" name="selection_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Selection Id"/>
<column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Website Id"/>
<column xsi:type="smallint" name="selection_price_type" padding="5" unsigned="true" nullable="false"
identity="false" default="0" comment="Selection Price Type"/>
<column xsi:type="decimal" name="selection_price_value" scale="4" precision="12" unsigned="false"
nullable="false" default="0" comment="Selection Price Value"/>
<column xsi:type="int" name="parent_product_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Parent Product Id"/>
<constraint xsi:type="primary" referenceId="PK_CATALOG_PRODUCT_BUNDLE_SELECTION_PRICE">
<column name="selection_id"/>
<column name="parent_product_id"/>
<column name="website_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="CAT_PRD_BNDL_SELECTION_PRICE_WS_ID_STORE_WS_WS_ID"
table="catalog_product_bundle_selection_price" column="website_id" referenceTable="store_website"
referenceColumn="website_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="FK_DCF37523AA05D770A70AA4ED7C2616E4"
table="catalog_product_bundle_selection_price" column="selection_id"
referenceTable="catalog_product_bundle_selection" referenceColumn="selection_id"
onDelete="CASCADE"/>
<index referenceId="CATALOG_PRODUCT_BUNDLE_SELECTION_PRICE_WEBSITE_ID" indexType="btree">
<column name="website_id"/>
</index>
</table>
<table name="catalog_product_bundle_price_index" resource="default" engine="innodb"
comment="Catalog Product Bundle Price Index">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Entity ID"/>
<column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Website Id"/>
<column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Customer Group ID"/>
<column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="false"
comment="Min Price"/>
<column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="false"
comment="Max Price"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="entity_id"/>
<column name="website_id"/>
<column name="customer_group_id"/>
</constraint>
<constraint xsi:type="foreign" referenceId="CAT_PRD_BNDL_PRICE_IDX_CSTR_GROUP_ID_CSTR_GROUP_CSTR_GROUP_ID"
table="catalog_product_bundle_price_index" column="customer_group_id"
referenceTable="customer_group" referenceColumn="customer_group_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="CAT_PRD_BNDL_PRICE_IDX_ENTT_ID_CAT_PRD_ENTT_ENTT_ID"
table="catalog_product_bundle_price_index" column="entity_id"
referenceTable="catalog_product_entity" referenceColumn="entity_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="CAT_PRD_BNDL_PRICE_IDX_WS_ID_STORE_WS_WS_ID"
table="catalog_product_bundle_price_index" column="website_id" referenceTable="store_website"
referenceColumn="website_id" onDelete="CASCADE"/>
<index referenceId="CATALOG_PRODUCT_BUNDLE_PRICE_INDEX_WEBSITE_ID" indexType="btree">
<column name="website_id"/>
</index>
<index referenceId="CATALOG_PRODUCT_BUNDLE_PRICE_INDEX_CUSTOMER_GROUP_ID" indexType="btree">
<column name="customer_group_id"/>
</index>
</table>
<table name="catalog_product_bundle_stock_index" resource="default" engine="innodb"
comment="Catalog Product Bundle Stock Index">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Entity ID"/>
<column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Website ID"/>
<column xsi:type="smallint" name="stock_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Stock 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="stock_status" padding="6" unsigned="false" nullable="true" identity="false"
default="0" comment="Stock Status"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="entity_id"/>
<column name="website_id"/>
<column name="stock_id"/>
<column name="option_id"/>
</constraint>
</table>
<table name="catalog_product_index_price_bundle_idx" resource="default" engine="innodb"
comment="Catalog Product Index Price Bundle Idx">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Entity ID"/>
<column xsi:type="int" name="customer_group_id" padding="11" unsigned="false" nullable="false"
identity="false"/>
<column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Website ID"/>
<column xsi:type="smallint" name="tax_class_id" padding="5" unsigned="true" nullable="true" identity="false"
default="0" comment="Tax Class ID"/>
<column xsi:type="smallint" name="price_type" padding="5" unsigned="true" nullable="false" identity="false"
comment="Price Type"/>
<column xsi:type="decimal" name="special_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Special Price"/>
<column xsi:type="decimal" name="tier_percent" scale="4" precision="12" unsigned="false" nullable="true"
comment="Tier Percent"/>
<column xsi:type="decimal" name="orig_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Orig Price"/>
<column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Price"/>
<column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Min Price"/>
<column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Max Price"/>
<column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Tier Price"/>
<column xsi:type="decimal" name="base_tier" scale="4" precision="12" unsigned="false" nullable="true"
comment="Base Tier"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="entity_id"/>
<column name="customer_group_id"/>
<column name="website_id"/>
</constraint>
</table>
<table name="catalog_product_index_price_bundle_tmp" resource="default" engine="memory"
comment="Catalog Product Index Price Bundle Tmp">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Entity ID"/>
<column xsi:type="int" name="customer_group_id" padding="11" unsigned="false" nullable="false"
identity="false"/>
<column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Website ID"/>
<column xsi:type="smallint" name="tax_class_id" padding="5" unsigned="true" nullable="true" identity="false"
default="0" comment="Tax Class ID"/>
<column xsi:type="smallint" name="price_type" padding="5" unsigned="true" nullable="false" identity="false"
comment="Price Type"/>
<column xsi:type="decimal" name="special_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Special Price"/>
<column xsi:type="decimal" name="tier_percent" scale="4" precision="12" unsigned="false" nullable="true"
comment="Tier Percent"/>
<column xsi:type="decimal" name="orig_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Orig Price"/>
<column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Price"/>
<column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Min Price"/>
<column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Max Price"/>
<column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Tier Price"/>
<column xsi:type="decimal" name="base_tier" scale="4" precision="12" unsigned="false" nullable="true"
comment="Base Tier"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="entity_id"/>
<column name="customer_group_id"/>
<column name="website_id"/>
</constraint>
</table>
<table name="catalog_product_index_price_bundle_sel_idx" resource="default" engine="innodb"
comment="Catalog Product Index Price Bundle Sel Idx">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Entity ID"/>
<column xsi:type="int" name="customer_group_id" padding="11" unsigned="false" nullable="false"
identity="false"/>
<column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Website ID"/>
<column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="false"
default="0" comment="Option Id"/>
<column xsi:type="int" name="selection_id" padding="10" unsigned="true" nullable="false" identity="false"
default="0" comment="Selection Id"/>
<column xsi:type="smallint" name="group_type" padding="5" unsigned="true" nullable="true" identity="false"
default="0" comment="Group Type"/>
<column xsi:type="smallint" name="is_required" padding="5" unsigned="true" nullable="true" identity="false"
default="0" comment="Is Required"/>
<column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Price"/>
<column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Tier Price"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="entity_id"/>
<column name="customer_group_id"/>
<column name="website_id"/>
<column name="option_id"/>
<column name="selection_id"/>
</constraint>
</table>
<table name="catalog_product_index_price_bundle_sel_tmp" resource="default" engine="memory"
comment="Catalog Product Index Price Bundle Sel Tmp">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Entity ID"/>
<column xsi:type="int" name="customer_group_id" padding="11" unsigned="false" nullable="false"
identity="false"/>
<column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Website ID"/>
<column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="false"
default="0" comment="Option Id"/>
<column xsi:type="int" name="selection_id" padding="10" unsigned="true" nullable="false" identity="false"
default="0" comment="Selection Id"/>
<column xsi:type="smallint" name="group_type" padding="5" unsigned="true" nullable="true" identity="false"
default="0" comment="Group Type"/>
<column xsi:type="smallint" name="is_required" padding="5" unsigned="true" nullable="true" identity="false"
default="0" comment="Is Required"/>
<column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Price"/>
<column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Tier Price"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="entity_id"/>
<column name="customer_group_id"/>
<column name="website_id"/>
<column name="option_id"/>
<column name="selection_id"/>
</constraint>
</table>
<table name="catalog_product_index_price_bundle_opt_idx" resource="default" engine="innodb"
comment="Catalog Product Index Price Bundle Opt Idx">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Entity ID"/>
<column xsi:type="int" name="customer_group_id" padding="11" unsigned="false" nullable="false"
identity="false"/>
<column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Website ID"/>
<column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="false"
default="0" comment="Option Id"/>
<column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Min Price"/>
<column xsi:type="decimal" name="alt_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Alt Price"/>
<column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Max Price"/>
<column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Tier Price"/>
<column xsi:type="decimal" name="alt_tier_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Alt Tier Price"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="entity_id"/>
<column name="customer_group_id"/>
<column name="website_id"/>
<column name="option_id"/>
</constraint>
</table>
<table name="catalog_product_index_price_bundle_opt_tmp" resource="default" engine="memory"
comment="Catalog Product Index Price Bundle Opt Tmp">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Entity ID"/>
<column xsi:type="int" name="customer_group_id" padding="11" unsigned="false" nullable="false"
identity="false"/>
<column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
comment="Website ID"/>
<column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="false"
default="0" comment="Option Id"/>
<column xsi:type="decimal" name="min_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Min Price"/>
<column xsi:type="decimal" name="alt_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Alt Price"/>
<column xsi:type="decimal" name="max_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Max Price"/>
<column xsi:type="decimal" name="tier_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Tier Price"/>
<column xsi:type="decimal" name="alt_tier_price" scale="4" precision="12" unsigned="false" nullable="true"
comment="Alt Tier Price"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="entity_id"/>
<column name="customer_group_id"/>
<column name="website_id"/>
<column name="option_id"/>
</constraint>
</table>
</schema>