[-] IN : FIX #PSCFV-10246 errors in stricts sql-mode, thanks @enumag

This commit is contained in:
gRoussac
2013-09-23 15:10:44 +02:00
parent c6222c51c8
commit dedc59f1db
6 changed files with 10 additions and 7 deletions
@@ -111,6 +111,9 @@ function p15012_add_missing_columns()
$q_list['order_invoice']['note']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_invoice`
CHANGE `note` note text';
$q_list['order_payment']['id_order_payment']['mod'] = 'UPDATE `'._DB_PREFIX_.'order_payment`
SET `id_order_invoice` = 0 WHERE `id_order_invoice` LIKE "" OR `id_order_invoice` IS NULL';
$q_list['order_payment']['id_order_invoice']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_payment`
CHANGE `id_order_invoice` id_order_invoice int(10) unsigned DEFAULT NULL';
+2 -2
View File
@@ -345,11 +345,11 @@ INSERT INTO `PREFIX_order_invoice` (`id_order`, `number`, `total_discount_tax_ex
ALTER TABLE `PREFIX_tab` ADD `active` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1';
UPDATE `PREFIX_order_detail` od
SET od.`id_order_invoice` = (
SET od.`id_order_invoice` = IFNULL((
SELECT oi.`id_order_invoice`
FROM `PREFIX_order_invoice` oi
WHERE oi.`id_order` = od.`id_order`
);
), 0);
INSERT INTO `PREFIX_order_carrier` (`id_order`, `id_carrier`, `id_order_invoice`, `weight`, `shipping_cost_tax_excl`, `shipping_cost_tax_incl`, `tracking_number`, `date_add`) (
SELECT `id_order`, `id_carrier`, (
+2 -2
View File
@@ -1,11 +1,11 @@
SET NAMES 'utf8';
UPDATE `PREFIX_orders` o
SET o.`current_state` = (
SET o.`current_state` = IFNULL((
SELECT oh.`id_order_state`
FROM `PREFIX_order_history` oh
WHERE oh.`id_order` = o.`id_order`
ORDER BY oh.`date_add` DESC
LIMIT 1
);
), 0);
+1 -1
View File
@@ -12,7 +12,7 @@ INSERT INTO `PREFIX_configuration`(`name`, `value`, `date_add`, `date_upd`) VALU
ALTER TABLE `PREFIX_product` CHANGE `width` `width` DECIMAL(20, 6) NOT NULL DEFAULT '0', CHANGE `height` `height` DECIMAL(20, 6) NOT NULL DEFAULT '0', CHANGE `depth` `depth` DECIMAL(20, 6) NOT NULL DEFAULT '0', CHANGE `weight` `weight` DECIMAL(20, 6) NOT NULL DEFAULT '0';
ALTER TABLE `PREFIX_product_attribute` CHANGE `weight` `weight` DECIMAL(20, 6) NOT NULL DEFAULT '0';
ALTER TABLE `PREFIX_product_attribute_shop` CHANGE `weight` `weight` DECIMAL(20, 6) NOT NULL DEFAULT '0';
ALTER TABLE `PREFIX_order_carrier` CHANGE `weight` `weight` DECIMAL(20, 6) NOT NULL DEFAULT '0';
ALTER IGNORE TABLE `PREFIX_order_carrier` CHANGE `weight` `weight` DECIMAL(20, 6) NOT NULL DEFAULT '0';
ALTER TABLE `PREFIX_attribute_impact` CHANGE `weight` `weight` DECIMAL(20, 6) NOT NULL DEFAULT '0';
ALTER TABLE `PREFIX_order_detail` CHANGE `product_weight` `product_weight` DECIMAL(20, 6) NOT NULL DEFAULT '0';
ALTER TABLE `PREFIX_stock_available` DROP INDEX `product_sqlstock`;
+1 -1
View File
@@ -24,7 +24,7 @@ INSERT INTO `PREFIX_configuration`(`name`, `value`, `date_add`, `date_upd`) VALU
ALTER TABLE `PREFIX_order_cart_rule` CHANGE `name` `name` VARCHAR(254);
ALTER TABLE `PREFIX_cart` CHANGE `delivery_option` `delivery_option` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER IGNORE TABLE `PREFIX_cart` CHANGE `delivery_option` `delivery_option` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `PREFIX_currency_shop` ADD `conversion_rate` DECIMAL( 13, 6 ) NOT NULL;
UPDATE `PREFIX_currency_shop` a SET `conversion_rate` = (SELECT `conversion_rate` FROM `PREFIX_currency` b WHERE a.id_currency = b.id_currency);
+1 -1
View File
@@ -2,4 +2,4 @@ SET NAMES 'utf8';
/* PHP:p1531_redirect_type(); */;
ALTER TABLE `PREFIX_cart` CHANGE `delivery_option` `delivery_option` TEXT NOT NULL;
ALTER IGNORE TABLE `PREFIX_cart` CHANGE `delivery_option` `delivery_option` TEXT NOT NULL;