Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion system/alters.sql
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,21 @@ ALTER TABLE `shopping_cart_session` ADD COLUMN `pickup_notification_sent_on` tim
-- version: 2.9.8
ALTER TABLE `shopping_cart_session` MODIFY COLUMN `partial_percentage` DECIMAL(12,6) DEFAULT '0.00';

-- 16/05/2023
-- version: 2.9.9
DELETE FROM `shopping_filtering_tags_has_attributes`
WHERE (`tag_id` IN (
SELECT DISTINCT `tag_id` FROM (SELECT `tag_id` FROM `shopping_filtering_tags_has_attributes` WHERE `tag_id` NOT IN (SELECT `id` FROM `shopping_tags`)) as sftha
));
ALTER TABLE `shopping_filtering_tags_has_attributes` ADD CONSTRAINT `shopping_filtering_tags_has_attributes_ibfk_1` FOREIGN KEY (`tag_id`) REFERENCES `shopping_tags` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;

DELETE FROM `shopping_filtering_values`
WHERE (`product_id` IN (
SELECT DISTINCT `product_id` FROM (SELECT `product_id` FROM `shopping_filtering_values` WHERE `product_id` NOT IN (SELECT `id` FROM `shopping_product`)) as sfv
));
ALTER TABLE `shopping_filtering_values` ADD CONSTRAINT `shopping_filtering_values_ibfk_2` FOREIGN KEY (`product_id`) REFERENCES `shopping_product` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;

-- These alters are always the latest and updated version of the database
UPDATE `plugin` SET `version`='2.9.9' WHERE `name`='shopping';
UPDATE `plugin` SET `version`='3.0.0' WHERE `name`='shopping';
SELECT version FROM `plugin` WHERE `name` = 'shopping';

4 changes: 2 additions & 2 deletions system/install.sql
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ INSERT INTO `shopping_config` (`name`, `value`) VALUES
('pickupLocationLinksLimit', 4),
('minimumOrder', '0'),
('fiscalYearStart', '1'),
('version', '2.9.7');
('version', '3.0.0');

DROP TABLE IF EXISTS `shopping_product`;
CREATE TABLE IF NOT EXISTS `shopping_product` (
Expand Down Expand Up @@ -1118,5 +1118,5 @@ WHERE `enabled` = '1' AND `trigger_name` = 'store_pickupnotification' AND `obser
AND EXISTS (SELECT name FROM `plugin` where `name` = 'shopping') LIMIT 1;

UPDATE `plugin` SET `tags`='processphones' WHERE `name` = 'shopping';
UPDATE `plugin` SET `version` = '2.9.9' WHERE `name` = 'shopping';
UPDATE `plugin` SET `version` = '3.0.0' WHERE `name` = 'shopping';

2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.9.9
3.0.0