Skip to content

Commit c051447

Browse files
authored
Merge pull request #17 from LucaGallinari/patch-2
Aligns to Open Source 2.4.7-p3
2 parents ec616ec + 5eda87f commit c051447

File tree

11 files changed

+141
-13
lines changed

11 files changed

+141
-13
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ You can use the following [sample](./downgrade.sample).
3535
- [Product](./scripts/product.sql)
3636
- [CMS](./scripts/cms.sql)
3737
- [EE Tables](./scripts/ee.sql)
38+
- [Wishlist](./scripts/wishlist.sql)
39+
- [CatalogInventory](./scripts/cataloginventory.sql)
40+
- [Customer](./scripts/customer.sql)
41+
- [Quote](./scripts/quote.sql)
42+
- [Sales](./scripts/sales.sql)
3843

3944
## Similar package
4045

downgrade.sample

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ mysql -u <user> -p<password> <database> < ./scripts/catalogrule.sql
55
mysql -u <user> -p<password> <database> < ./scripts/salesrule.sql
66
mysql -u <user> -p<password> <database> < ./scripts/category.sql
77
mysql -u <user> -p<password> <database> < ./scripts/product.sql
8+
mysql -u <user> -p<password> <database> < ./scripts/cataloginventory.sql
9+
mysql -u <user> -p<password> <database> < ./scripts/customer.sql
10+
mysql -u <user> -p<password> <database> < ./scripts/quote.sql
11+
mysql -u <user> -p<password> <database> < ./scripts/sales.sql
12+
mysql -u <user> -p<password> <database> < ./scripts/wishlist.sql

scripts/cataloginventory.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ALTER TABLE `cataloginventory_stock_item`
2+
DROP COLUMN `deferred_stock_update`,
3+
DROP COLUMN `use_config_deferred_stock_update`;

scripts/category.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ SET FOREIGN_KEY_CHECKS = 1;
109109

110110
-- Foreign keys
111111
ALTER TABLE `catalog_category_entity_datetime`
112-
ADD CONSTRAINT `CAT_CTGR_ENTT_DTIME_ROW_ID_CAT_CTGR_ENTT_ROW_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE RESTRICT;
112+
ADD CONSTRAINT `CAT_CTGR_ENTT_DTIME_ENTT_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE RESTRICT;
113113
ALTER TABLE `catalog_category_entity_decimal`
114-
ADD CONSTRAINT `CAT_CTGR_ENTT_DEC_ROW_ID_CAT_CTGR_ENTT_ROW_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE RESTRICT;
114+
ADD CONSTRAINT `CAT_CTGR_ENTT_DEC_ENTT_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE RESTRICT;
115115
ALTER TABLE `catalog_category_entity_int`
116-
ADD CONSTRAINT `CAT_CTGR_ENTT_INT_ROW_ID_CAT_CTGR_ENTT_ROW_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE RESTRICT;
116+
ADD CONSTRAINT `CAT_CTGR_ENTT_INT_ENTT_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE RESTRICT;
117117
ALTER TABLE `catalog_category_entity_text`
118-
ADD CONSTRAINT `CAT_CTGR_ENTT_TEXT_ROW_ID_CAT_CTGR_ENTT_ROW_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE RESTRICT;
118+
ADD CONSTRAINT `CAT_CTGR_ENTT_TEXT_ENTT_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE RESTRICT;
119119
ALTER TABLE `catalog_category_entity_varchar`
120-
ADD CONSTRAINT `CAT_CTGR_ENTT_VCHR_ROW_ID_CAT_CTGR_ENTT_ROW_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE RESTRICT;
120+
ADD CONSTRAINT `CAT_CTGR_ENTT_VCHR_ENTT_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE RESTRICT;
121121

122122
-- ----------------
123123
-- Drop sequence --

scripts/cms.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ ALTER TABLE `cms_page`
6868
DROP COLUMN `row_id`,
6969
DROP COLUMN `created_in`,
7070
DROP COLUMN `updated_in`,
71+
DROP COLUMN `website_root`,
7172
ADD PRIMARY KEY (`page_id`),
7273
MODIFY COLUMN `page_id` SMALLINT(6) NOT NULL AUTO_INCREMENT COMMENT 'Entity ID';
7374
SET FOREIGN_KEY_CHECKS = 1;

scripts/customer.sql

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ALTER TABLE `customer_eav_attribute`
2+
DROP COLUMN `is_used_for_customer_segment`;
3+
4+
ALTER TABLE `customer_entity`
5+
DROP INDEX `CUSTOMER_ENTITY_CREATED_AT`,
6+
DROP INDEX `CUSTOMER_ENTITY_DOB`,
7+
DROP INDEX `CUSTOMER_ENTITY_DEFAULT_BILLING`,
8+
DROP INDEX `CUSTOMER_ENTITY_DEFAULT_SHIPPING`,
9+
DROP INDEX `CUSTOMER_ENTITY_GENDER`,
10+
DROP INDEX `CUSTOMER_ENTITY_GROUP_ID`;

scripts/ee.sql

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88

99
SET FOREIGN_KEY_CHECKS = 0;
1010
DROP TABLE IF EXISTS
11-
`magento_acknowledged_bulk`,
11+
`catalogpermissions_category_cl`,
12+
`catalogpermissions_product_cl`,
1213
`magento_banner`,
1314
`magento_banner_catalogrule`,
1415
`magento_banner_content`,
1516
`magento_banner_customersegment`,
1617
`magento_banner_salesrule`,
17-
`magento_bulk`,
1818
`magento_catalogevent_event`,
1919
`magento_catalogevent_event_image`,
2020
`magento_catalogpermissions`,
@@ -54,7 +54,6 @@ DROP TABLE IF EXISTS
5454
`magento_invitation_track`,
5555
`magento_logging_event`,
5656
`magento_logging_event_changes`,
57-
`magento_operation`,
5857
`magento_reminder_rule`,
5958
`magento_reminder_rule_coupon`,
6059
`magento_reminder_rule_log`,
@@ -97,5 +96,10 @@ DROP TABLE IF EXISTS
9796
`magento_versionscms_hierarchy_metadata`,
9897
`magento_versionscms_hierarchy_node`,
9998
`magento_versionscms_increment`,
99+
`staging_update`,
100+
`support_backup`,
101+
`support_backup_item`,
102+
`support_report`,
103+
`quote_preview`,
100104
`visual_merchandiser_rule`;
101105
SET FOREIGN_KEY_CHECKS = 1;

scripts/product.sql

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ ALTER TABLE `downloadable_sample`
244244

245245
ALTER TABLE `catalog_product_bundle_selection_price`
246246
DROP FOREIGN KEY `CAT_PRD_BNDL_SELECTION_PRICE_PARENT_PRD_ID_CAT_PRD_ENTT_ROW_ID`,
247-
DROP FOREIGN KEY `CAT_PRD_BNDL_SELECTION_PRICE_WS_ID_STORE_WS_WS_ID`,
248247
DROP FOREIGN KEY `FK_AE9FDBF7988FB6BE3E04D91DA2CFB273`,
249248
DROP PRIMARY KEY,
250249
DROP COLUMN `parent_product_id`,
@@ -269,7 +268,7 @@ ALTER TABLE `catalog_product_bundle_option`
269268
DROP PRIMARY KEY,
270269
DROP COLUMN `parent_id`,
271270
CHANGE COLUMN `new_parent_id` `parent_id` INT(10) UNSIGNED NOT NULL COMMENT 'Parent ID',
272-
ADD CONSTRAINT `CATALOG_PRODUCT_BUNDLE_OPTION_PARENT_ID` UNIQUE KEY (`parent_id`),
271+
ADD INDEX `CATALOG_PRODUCT_BUNDLE_OPTION_PARENT_ID` (`parent_id`),
273272
MODIFY COLUMN `option_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Option ID',
274273
ADD PRIMARY KEY (`option_id`);
275274

@@ -287,8 +286,6 @@ ALTER TABLE `catalog_product_bundle_selection`
287286
ADD CONSTRAINT `CAT_PRD_BNDL_SELECTION_OPT_ID_CAT_PRD_BNDL_OPT_OPT_ID` FOREIGN KEY (`option_id`) REFERENCES `catalog_product_bundle_option` (`option_id`) ON DELETE CASCADE ON UPDATE RESTRICT;
288287

289288
ALTER TABLE `catalog_product_bundle_selection_price`
290-
DROP INDEX `CATALOG_PRODUCT_BUNDLE_SELECTION_PRICE_WEBSITE_ID`,
291-
ADD CONSTRAINT `CATALOG_PRODUCT_BUNDLE_SELECTION_PRICE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `store_website` (`website_id`) ON DELETE CASCADE ON UPDATE RESTRICT,
292289
ADD CONSTRAINT `FK_DCF37523AA05D770A70AA4ED7C2616E4` FOREIGN KEY (`selection_id`) REFERENCES `catalog_product_bundle_selection` (`selection_id`) ON DELETE CASCADE ON UPDATE RESTRICT;
293290

294291
-- ------------------------------------------------------------------
@@ -354,7 +351,8 @@ ALTER TABLE `catalog_product_entity_media_gallery_value_to_entity`
354351
DROP FOREIGN KEY `CAT_PRD_ENTT_MDA_GLR_VAL_TO_ENTT_ROW_ID_CAT_PRD_ENTT_ROW_ID`,
355352
DROP INDEX `CAT_PRD_ENTT_MDA_GLR_VAL_TO_ENTT_ROW_ID_CAT_PRD_ENTT_ROW_ID`,
356353
ADD CONSTRAINT `CAT_PRD_ENTT_MDA_GLR_VAL_TO_ENTT_VAL_ID_ENTT_ID` UNIQUE KEY (`value_id`,`entity_id`),
357-
DROP PRIMARY KEY, ADD PRIMARY KEY (`value_id`),
354+
DROP KEY CAT_PRD_ENTT_MDA_GLR_VAL_TO_ENTT_VAL_ID_ROW_ID,
355+
ADD PRIMARY KEY (`value_id`,`entity_id`),
358356
DROP COLUMN `row_id`;
359357

360358
-- Gallery value

scripts/quote.sql

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# These columns are add by these three EE modules: Magento_CustomerBalance, Magento_GiftCardAccount and Magento_GiftRegistry
2+
ALTER TABLE `quote`
3+
DROP COLUMN `customer_balance_amount_used`,
4+
DROP COLUMN `base_customer_bal_amount_used`,
5+
DROP COLUMN `use_customer_balance`,
6+
7+
DROP COLUMN `gift_cards`,
8+
DROP COLUMN `gift_cards_amount`,
9+
DROP COLUMN `base_gift_cards_amount`,
10+
DROP COLUMN `gift_cards_amount_used`,
11+
DROP COLUMN `base_gift_cards_amount_used`,
12+
13+
DROP COLUMN `use_reward_points`,
14+
DROP COLUMN `reward_points_balance`,
15+
DROP COLUMN `base_reward_currency_amount`,
16+
DROP COLUMN `reward_currency_amount`;
17+
18+
ALTER TABLE `quote_item`
19+
DROP COLUMN `giftregistry_item_id`,
20+
DROP COLUMN `event_id`;
21+
22+
ALTER TABLE `quote_address`
23+
DROP COLUMN `base_customer_balance_amount`,
24+
DROP COLUMN `customer_balance_amount`,
25+
26+
DROP COLUMN `gift_cards_amount`,
27+
DROP COLUMN `base_gift_cards_amount`,
28+
DROP COLUMN `gift_cards`,
29+
DROP COLUMN `used_gift_cards`,
30+
DROP COLUMN `giftregistry_item_id`,
31+
32+
DROP COLUMN `reward_points_balance`,
33+
DROP COLUMN `base_reward_currency_amount`,
34+
DROP COLUMN `reward_currency_amount`;

scripts/sales.sql

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# These columns are add by these three EE modules: Magento_CustomerBalance, Magento_GiftCardAccount and Magento_GiftRegistry
2+
ALTER TABLE `sales_order`
3+
DROP COLUMN `base_customer_balance_amount`,
4+
DROP COLUMN `customer_balance_amount`,
5+
DROP COLUMN `base_customer_balance_invoiced`,
6+
DROP COLUMN `customer_balance_invoiced`,
7+
DROP COLUMN `base_customer_balance_refunded`,
8+
DROP COLUMN `customer_balance_refunded`,
9+
DROP COLUMN `customer_bal_total_refunded`,
10+
DROP COLUMN `bs_customer_bal_total_refunded`,
11+
12+
DROP COLUMN `gift_cards`,
13+
DROP COLUMN `base_gift_cards_amount`,
14+
DROP COLUMN `gift_cards_amount`,
15+
DROP COLUMN `base_gift_cards_invoiced`,
16+
DROP COLUMN `gift_cards_invoiced`,
17+
DROP COLUMN `base_gift_cards_refunded`,
18+
DROP COLUMN `gift_cards_refunded`,
19+
20+
DROP COLUMN `reward_points_balance`,
21+
DROP COLUMN `base_reward_currency_amount`,
22+
DROP COLUMN `reward_currency_amount`,
23+
DROP COLUMN `base_rwrd_crrncy_amt_invoiced`,
24+
DROP COLUMN `rwrd_currency_amount_invoiced`,
25+
DROP COLUMN `base_rwrd_crrncy_amnt_refnded`,
26+
DROP COLUMN `rwrd_crrncy_amnt_refunded`,
27+
DROP COLUMN `reward_points_balance_refund`;
28+
29+
ALTER TABLE `sales_order_item`
30+
DROP COLUMN `giftregistry_item_id`,
31+
DROP COLUMN `event_id`,
32+
DROP COLUMN `qty_returned`;
33+
34+
ALTER TABLE `sales_order_address`
35+
DROP COLUMN `giftregistry_item_id`;
36+
37+
ALTER TABLE `sales_invoice`
38+
DROP COLUMN `base_customer_balance_amount`,
39+
DROP COLUMN `customer_balance_amount`,
40+
41+
DROP COLUMN `base_gift_cards_amount`,
42+
DROP COLUMN `gift_cards_amount`,
43+
44+
DROP COLUMN `base_reward_currency_amount`,
45+
DROP COLUMN `reward_currency_amount`,
46+
DROP COLUMN `reward_points_balance`;
47+
48+
ALTER TABLE `sales_creditmemo`
49+
DROP COLUMN `base_customer_balance_amount`,
50+
DROP COLUMN `customer_balance_amount`,
51+
DROP COLUMN `bs_customer_bal_total_refunded`,
52+
DROP COLUMN `customer_bal_total_refunded`,
53+
54+
DROP COLUMN `base_gift_cards_amount`,
55+
DROP COLUMN `gift_cards_amount`,
56+
57+
DROP COLUMN `base_reward_currency_amount`,
58+
DROP COLUMN `reward_currency_amount`,
59+
DROP COLUMN `reward_points_balance`,
60+
DROP COLUMN `reward_points_balance_refund`;
61+
62+
ALTER TABLE `sales_order_grid`
63+
DROP COLUMN `refunded_to_store_credit`;

0 commit comments

Comments
 (0)