Skip to content

Commit

Permalink
Adding missing SQL compare to a fresh install
Browse files Browse the repository at this point in the history
  • Loading branch information
M0rgan01 committed Apr 16, 2024
1 parent ecf0ea9 commit 2cdf329
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion upgrade/sql/1.7.6.0.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SET SESSION sql_mode = '';
SET NAMES 'utf8';

ALTER TABLE `PREFIX_currency` ADD `numeric_iso_code` varchar(3) NOT NULL DEFAULT '0' AFTER `iso_code`;
ALTER TABLE `PREFIX_currency` ADD `numeric_iso_code` varchar(3) DEFAULT NULL AFTER `iso_code`;
ALTER TABLE `PREFIX_currency` ADD `precision` int(2) NOT NULL DEFAULT 6 AFTER `numeric_iso_code`;
ALTER TABLE `PREFIX_currency` ADD KEY `currency_iso_code` (`iso_code`);

Expand Down
2 changes: 1 addition & 1 deletion upgrade/sql/1.7.7.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ ALTER TABLE `PREFIX_order_payment` CHANGE `amount` `amount` DECIMAL(20, 6) NOT N

/* attribute_impact price */
UPDATE `PREFIX_attribute_impact` SET `price` = RIGHT(`price`, 17) WHERE LENGTH(`price`) > 17;
ALTER TABLE `PREFIX_attribute_impact` CHANGE `price` `price` DECIMAL(20, 6) NOT NULL DEFAULT '0.000000';
ALTER TABLE `PREFIX_attribute_impact` CHANGE `price` `price` DECIMAL(20, 6) NOT NULL;

/* cart_rule minimum_amount & reduction_amount */
UPDATE `PREFIX_cart_rule` SET `minimum_amount` = RIGHT(`minimum_amount`, 17) WHERE LENGTH(`minimum_amount`) > 17;
Expand Down
6 changes: 4 additions & 2 deletions upgrade/sql/1.7.8.0.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
SET SESSION sql_mode='';
SET NAMES 'utf8mb4';

DROP TABLE IF EXISTS `PREFIX_order_slip_detail_tax`;

INSERT INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `position`) VALUES
(NULL, 'actionPresentCart', 'Cart Presenter', 'This hook is called before a cart is presented', '1'),
(NULL, 'actionPresentOrder', 'Order footer', 'This hook is called before an order is presented', '1'),
Expand Down Expand Up @@ -170,8 +172,8 @@ ALTER TABLE `PREFIX_product` MODIFY COLUMN `redirect_type` ENUM(
) NOT NULL DEFAULT '404';

ALTER TABLE `PREFIX_product` ADD `product_type` ENUM(
'standard', 'pack', 'virtual', 'combinations'
) NOT NULL DEFAULT 'standard';
'standard', 'pack', 'virtual', 'combinations', ''
) NOT NULL DEFAULT '';

/* First set all products to standard type, then update them based on cached columns that identify the type */
UPDATE `PREFIX_product` SET `product_type` = "standard";
Expand Down
6 changes: 4 additions & 2 deletions upgrade/sql/8.0.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ SET NAMES 'utf8mb4';
DROP TABLE IF EXISTS `PREFIX_referrer`;
DROP TABLE IF EXISTS `PREFIX_referrer_cache`;
DROP TABLE IF EXISTS `PREFIX_referrer_shop`;
DROP TABLE IF EXISTS `PREFIX_attribute_impact`;

/* Remove page Referrers */
## Remove Tabs
Expand Down Expand Up @@ -191,8 +192,8 @@ ALTER TABLE `PREFIX_product` MODIFY COLUMN `redirect_type` ENUM(
'404', '410', '301-product', '302-product', '301-category', '302-category'
) NOT NULL DEFAULT '404';
ALTER TABLE `PREFIX_product_shop` MODIFY COLUMN `redirect_type` ENUM(
'404', '410', '301-product', '302-product', '301-category', '302-category'
) NOT NULL DEFAULT '404';
'', '404', '410', '301-product', '302-product', '301-category', '302-category'
) NOT NULL DEFAULT '';

ALTER TABLE `PREFIX_tab` ADD route_name VARCHAR(256) DEFAULT NULL;

Expand Down Expand Up @@ -237,3 +238,4 @@ UPDATE `PREFIX_carrier` SET `name` = 'Click and collect' WHERE `name` = '0';
/* Remove deprecated columns */
/* PHP:drop_column_if_exists('product_attribute', 'location'); */;
/* PHP:drop_column_if_exists('product_attribute', 'quantity'); */;
/* PHP:drop_column_if_exists('orders', 'shipping_number'); */;

0 comments on commit 2cdf329

Please sign in to comment.