Jump to content

Recommended Posts

Ik ben al een hele tijd bezig om mijn shop te updaten, en vandaag maar even de gok gewaagd.

 

Nadat de site geupdate is, krijg ik succesvol de melding dat ik op 1.4.4.1 zit, maar dat er wel 41(!) SQL fouten zijn..

 

hieronder staan ze:

 

SET NAMES 'utf8'

SET NAMES 'utf8'

ALTER TABLE `ps_order_detail` ADD `reduction_percent` DECIMAL(10, 2) NOT NULL AFTER `product_price`

ALTER TABLE `ps_order_detail` ADD `reduction_amount` DECIMAL(20, 6) NOT NULL AFTER `reduction_percent`

ALTER TABLE `ps_country` CHANGE `need_identification_number` `need_identification_number` TINYINT(1) NOT NULL DEFAULT '0'

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_1_3_2_UPDATE_DATE', NOW(), NOW(), NOW())

ALTER TABLE `ps_search_index` CHANGE `weight` `weight` SMALLINT(4) unsigned NOT NULL DEFAULT '1'

ALTER TABLE `ps_image` DROP INDEX `product_position`, ADD UNIQUE `product_position` (`id_product`, `position`)

ALTER TABLE `ps_zone` DROP `enabled`

SET @id_hook = (SELECT id_hook FROM ps_hook WHERE name = 'backOfficeHeader')

SET @position = (SELECT IFNULL(MAX(position),0)+1 FROM ps_hook_module WHERE id_hook = @id_hook)

INSERT IGNORE INTO ps_hook_module (id_hook, id_module, position) VALUES (@id_hook, (SELECT id_module FROM ps_module WHERE name = 'statsbestcustomers'), @position)

SET @position = @position + 1

INSERT IGNORE INTO ps_hook_module (id_hook, id_module, position) VALUES (@id_hook, (SELECT id_module FROM ps_module WHERE name = 'statsbestproducts'), @position)

SET @position = @position + 1

INSERT IGNORE INTO ps_hook_module (id_hook, id_module, position) VALUES (@id_hook, (SELECT id_module FROM ps_module WHERE name = 'statsbestvouchers'), @position)

SET @position = @position + 1

INSERT IGNORE INTO ps_hook_module (id_hook, id_module, position) VALUES (@id_hook, (SELECT id_module FROM ps_module WHERE name = 'statsbestcategories'), @position)

SET @position = @position + 1

INSERT IGNORE INTO ps_hook_module (id_hook, id_module, position) VALUES (@id_hook, (SELECT id_module FROM ps_module WHERE name = 'statsbestcarriers'), @position)

SET NAMES 'utf8'

SET NAMES 'utf8'

ALTER TABLE `ps_order_detail` ADD `group_reduction` DECIMAL(10, 2) NOT NULL AFTER `reduction_amount`

ALTER TABLE `ps_order_detail` ADD `ecotax_tax_rate` DECIMAL(5, 3) NOT NULL AFTER `ecotax`

ALTER TABLE `ps_product` CHANGE `ecotax` `ecotax` DECIMAL(21, 6) NOT NULL DEFAULT '0.00'

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) SELECT 'PS_LOCALE_LANGUAGE', l.`iso_code`, NOW(), NOW() FROM `ps_configuration` c INNER JOIN `ps_lang` l ON (l.`id_lang` = c.`value`) WHERE c.`name` = 'PS_LANG_DEFAULT'

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) SELECT 'PS_LOCALE_COUNTRY', co.`iso_code`, NOW(), NOW() FROM `ps_configuration` c INNER JOIN `ps_country` co ON (co.`id_country` = c.`value`) WHERE c.`name` = 'PS_COUNTRY_DEFAULT'

SET NAMES 'utf8'

SET NAMES 'utf8'

SET NAMES 'utf8'

/* PHP:update_products_ecotax_v133(); */

SET NAMES 'utf8'

SET NAMES 'utf8'

SET NAMES 'utf8'

ALTER TABLE `ps_employee` ADD `bo_color` varchar(32) default NULL AFTER `stats_date_to`

ALTER TABLE `ps_employee` ADD `bo_theme` varchar(32) default NULL AFTER `bo_color`

ALTER TABLE `ps_employee` ADD `bo_uimode` ENUM('hover','click') default 'click' AFTER `bo_theme`

ALTER TABLE `ps_employee` ADD `id_lang` int(10) unsigned NOT NULL default 0 AFTER `id_profile`

ALTER TABLE `ps_cms` ADD `id_cms_category` int(10) unsigned NOT NULL default '0' AFTER `id_cms`

ALTER TABLE `ps_cms` ADD `position` int(10) unsigned NOT NULL default '0' AFTER `id_cms_category`

CREATE TABLE `ps_cms_category` ( `id_cms_category` int(10) unsigned NOT NULL AUTO_INCREMENT, `id_parent` int(10) unsigned NOT NULL, `level_depth` tinyint(3) unsigned NOT NULL DEFAULT '0', `active` tinyint(1) unsigned NOT NULL DEFAULT '0', `date_add` datetime NOT NULL, `date_upd` datetime NOT NULL, `position` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id_cms_category`), KEY `category_parent` (`id_parent`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_cms_category' already exists

CREATE TABLE `ps_cms_category_lang` ( `id_cms_category` int(10) unsigned NOT NULL, `id_lang` int(10) unsigned NOT NULL, `name` varchar(128) NOT NULL, `description` text, `link_rewrite` varchar(128) NOT NULL, `meta_title` varchar(128) DEFAULT NULL, `meta_keywords` varchar(255) DEFAULT NULL, `meta_description` varchar(255) DEFAULT NULL, UNIQUE KEY `category_lang_index` (`id_cms_category`,`id_lang`), KEY `category_name` (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_cms_category_lang' already exists

INSERT INTO `ps_cms_category_lang` VALUES(1, 1, 'Home', '', 'home', NULL, NULL, NULL)
(1062) Duplicate entry '1-1' for key 1

INSERT INTO `ps_cms_category_lang` VALUES(1, 2, 'Accueil', '', 'home', NULL, NULL, NULL)
(1062) Duplicate entry '1-2' for key 1

INSERT INTO `ps_cms_category_lang` VALUES(1, 3, 'Inicio', '', 'home', NULL, NULL, NULL)
(1062) Duplicate entry '1-3' for key 1

INSERT INTO `ps_cms_category` VALUES(1, 0, 0, 1, NOW(), NOW(),0)
(1062) Duplicate entry '1' for key 1

UPDATE `ps_cms_category` SET `position` = 0

UPDATE `ps_cms` SET `position` = 0

UPDATE `ps_cms` SET `id_cms_category` = 0

ALTER TABLE `ps_category` ADD `position` int(10) unsigned NOT NULL default '0' AFTER `date_upd`

UPDATE `ps_employee` SET `id_lang` = (SELECT `value` FROM `ps_configuration` WHERE `name` LIKE "PS_LANG_DEFAULT")

ALTER TABLE `ps_customer` ADD `note` text AFTER `secure_key`

ALTER TABLE `ps_contact` ADD `customer_service` tinyint(1) NOT NULL DEFAULT 0 AFTER `email`

CREATE TABLE `ps_customer_thread` ( `id_customer_thread` int(11) unsigned NOT NULL auto_increment, `id_lang` int(10) unsigned NOT NULL, `id_contact` int(10) unsigned NOT NULL, `id_customer` int(10) unsigned default NULL, `id_order` int(10) unsigned default NULL, `id_product` int(10) unsigned default NULL, `status` enum('open','closed','pending1','pending2') NOT NULL default 'open', `email` varchar(128) NOT NULL, `token` varchar(12) default NULL, `date_add` datetime NOT NULL, `date_upd` datetime NOT NULL, PRIMARY KEY (`id_customer_thread`), KEY `id_customer_thread` (`id_customer_thread`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_customer_thread' already exists

CREATE TABLE `ps_customer_message` ( `id_customer_message` int(10) unsigned NOT NULL auto_increment, `id_customer_thread` int(11) default NULL, `id_employee` int(10) unsigned default NULL, `message` text NOT NULL, `file_name` varchar(18) DEFAULT NULL, `ip_address` int(11) default NULL, `user_agent` varchar(128) default NULL, `date_add` datetime NOT NULL, PRIMARY KEY (`id_customer_message`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_customer_message' already exists

CREATE TABLE `ps_payment_cc` ( `id_payment_cc` INT NOT NULL auto_increment, `id_order` INT UNSIGNED NULL, `id_currency` INT UNSIGNED NOT NULL, `amount` DECIMAL(10,2) NOT NULL, `transaction_id` VARCHAR(254) NULL, `card_number` VARCHAR(254) NULL, `card_brand` VARCHAR(254) NULL, `card_expiration` CHAR(7) NULL, `card_holder` VARCHAR(254) NULL, `date_add` DATETIME NOT NULL, PRIMARY KEY (`id_payment_cc`), KEY `id_order` (`id_order`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_payment_cc' already exists

CREATE TABLE `ps_specific_price` ( `id_specific_price` INT UNSIGNED NOT NULL AUTO_INCREMENT, `id_product` INT UNSIGNED NOT NULL, `id_shop` TINYINT UNSIGNED NOT NULL, `id_currency` INT UNSIGNED NOT NULL, `id_country` INT UNSIGNED NOT NULL, `id_group` INT UNSIGNED NOT NULL, `priority` SMALLINT UNSIGNED NOT NULL, `price` DECIMAL(20, 6) NOT NULL, `from_quantity` SMALLINT UNSIGNED NOT NULL, `reduction` DECIMAL(20, 6) NOT NULL, `reduction_type` ENUM('amount', 'percentage') NOT NULL, `from` DATETIME NOT NULL, `to` DATETIME NOT NULL, PRIMARY KEY(`id_specific_price`), KEY (`id_product`, `id_shop`, `id_currency`, `id_country`, `id_group`, `from_quantity`, `from`, `to`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_specific_price' already exists

INSERT INTO `ps_specific_price` (`id_product`, `id_shop`, `id_currency`, `id_country`, `id_group`, `priority`, `price`, `from_quantity`, `reduction`, `reduction_type`, `from`, `to`) (	SELECT dq.`id_product`, 1, 1, 0, 1, 0, 0.00, dq.`quantity`, IF(dq.`id_discount_type` = 2, dq.`value`, dq.`value` / 100), IF (dq.`id_discount_type` = 2, 'amount', 'percentage'), '0000-00-00 00:00:00', '0000-00-00 00:00:00' FROM `ps_discount_quantity` dq INNER JOIN `ps_product` p ON (p.`id_product` = dq.`id_product`) )
(1054) Unknown column 'priority' in 'field list'

DROP TABLE `ps_discount_quantity`

INSERT INTO `ps_specific_price` (`id_product`, `id_shop`, `id_currency`, `id_country`, `id_group`, `priority`, `price`, `from_quantity`, `reduction`, `reduction_type`, `from`, `to`) ( SELECT p.`id_product`, 1, 0, 0, 0, 0, 0.00, 1, IF(p.`reduction_price` > 0, p.`reduction_price`, p.`reduction_percent` / 100), IF(p.`reduction_price` > 0, 'amount', 'percentage'), IF (p.`reduction_from` = p.`reduction_to`, '0000-00-00 00:00:00', p.`reduction_from`), IF (p.`reduction_from` = p.`reduction_to`, '0000-00-00 00:00:00', p.`reduction_to`) FROM `ps_product` p WHERE p.`reduction_price` OR p.`reduction_percent` )
(1054) Unknown column 'priority' in 'field list'

ALTER TABLE `ps_product` DROP `reduction_price`, DROP `reduction_percent`, DROP `reduction_from`, DROP `reduction_to`

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_SPECIFIC_PRICE_PRIORITIES', 'id_shop;id_currency;id_country;id_group', NOW(), NOW()), ('PS_TAX_DISPLAY', 0, NOW(), NOW()), ('PS_SMARTY_FORCE_COMPILE', 1, NOW(), NOW()), ('PS_DISTANCE_UNIT', 'km', NOW(), NOW()), ('PS_STORES_DISPLAY_CMS', 0, NOW(), NOW()), ('PS_STORES_DISPLAY_FOOTER', 0, NOW(), NOW()), ('PS_STORES_SIMPLIFIED', 0, NOW(), NOW()), ('PS_STATSDATA_CUSTOMER_PAGESVIEWS', 1, NOW(), NOW()), ('PS_STATSDATA_PAGESVIEWS', 1, NOW(), NOW()), ('PS_STATSDATA_PLUGINS', 1, NOW(), NOW())

CREATE TABLE `ps_group_reduction` ( `id_group_reduction` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT, `id_group` INT(10) UNSIGNED NOT NULL, `id_category` INT(10) UNSIGNED NOT NULL, `reduction` DECIMAL(4, 3) NOT NULL, PRIMARY KEY(`id_group_reduction`), UNIQUE KEY(`id_group`, `id_category`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_group_reduction' already exists

CREATE TABLE `ps_product_group_reduction_cache` ( `id_product` INT UNSIGNED NOT NULL, `id_group` INT UNSIGNED NOT NULL, `reduction` DECIMAL(4, 3) NOT NULL, PRIMARY KEY(`id_product`, `id_group`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_product_group_reduction_cache' already exists

ALTER TABLE `ps_currency` ADD `iso_code_num` varchar(3) NOT NULL default '0' AFTER `iso_code`

UPDATE `ps_currency` SET iso_code_num = '978' WHERE iso_code LIKE 'EUR' LIMIT 1

UPDATE `ps_currency` SET iso_code_num = '840' WHERE iso_code LIKE 'USD' LIMIT 1

UPDATE `ps_currency` SET iso_code_num = '826' WHERE iso_code LIKE 'GBP' LIMIT 1

ALTER TABLE `ps_country` ADD `call_prefix` int(10) NOT NULL default '0' AFTER `iso_code`

UPDATE `ps_country` SET `call_prefix` = 49 WHERE `iso_code` = 'DE' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 43 WHERE `iso_code` = 'AT' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 32 WHERE `iso_code` = 'BE' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 1 WHERE `iso_code` = 'CA' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 86 WHERE `iso_code` = 'CN' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 34 WHERE `iso_code` = 'ES' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 358 WHERE `iso_code` = 'FI' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 33 WHERE `iso_code` = 'FR' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 30 WHERE `iso_code` = 'GR' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 39 WHERE `iso_code` = 'IT' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 81 WHERE `iso_code` = 'JP' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 352 WHERE `iso_code` = 'LU' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 31 WHERE `iso_code` = 'NL' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 48 WHERE `iso_code` = 'PL' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 351 WHERE `iso_code` = 'PT' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 420 WHERE `iso_code` = 'CZ' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 44 WHERE `iso_code` = 'GB' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 46 WHERE `iso_code` = 'SE' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 41 WHERE `iso_code` = 'CH' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 45 WHERE `iso_code` = 'DK' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 1 WHERE `iso_code` = 'US' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 852 WHERE `iso_code` = 'HK' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 47 WHERE `iso_code` = 'NO' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 61 WHERE `iso_code` = 'AU' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 65 WHERE `iso_code` = 'SG' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 353 WHERE `iso_code` = 'IE' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 64 WHERE `iso_code` = 'NZ' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 82 WHERE `iso_code` = 'KR' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 972 WHERE `iso_code` = 'IL' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 27 WHERE `iso_code` = 'ZA' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 234 WHERE `iso_code` = 'NG' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 225 WHERE `iso_code` = 'CI' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 228 WHERE `iso_code` = 'TG' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 591 WHERE `iso_code` = 'BO' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 230 WHERE `iso_code` = 'MU' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 40 WHERE `iso_code` = 'RO' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 421 WHERE `iso_code` = 'SK' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 213 WHERE `iso_code` = 'DZ' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 376 WHERE `iso_code` = 'AD' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 244 WHERE `iso_code` = 'AO' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 54 WHERE `iso_code` = 'AR' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 374 WHERE `iso_code` = 'AM' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 297 WHERE `iso_code` = 'AW' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 994 WHERE `iso_code` = 'AZ' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 973 WHERE `iso_code` = 'BH' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 880 WHERE `iso_code` = 'BD' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 501 WHERE `iso_code` = 'BZ' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 229 WHERE `iso_code` = 'BJ' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 975 WHERE `iso_code` = 'BT' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 267 WHERE `iso_code` = 'BW' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 55 WHERE `iso_code` = 'BR' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 673 WHERE `iso_code` = 'BN' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 226 WHERE `iso_code` = 'BF' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 95 WHERE `iso_code` = 'MM' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 257 WHERE `iso_code` = 'BI' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 855 WHERE `iso_code` = 'KH' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 237 WHERE `iso_code` = 'CM' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 238 WHERE `iso_code` = 'CV' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 236 WHERE `iso_code` = 'CF' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 235 WHERE `iso_code` = 'TD' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 56 WHERE `iso_code` = 'CL' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 57 WHERE `iso_code` = 'CO' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 269 WHERE `iso_code` = 'KM' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 242 WHERE `iso_code` = 'CD' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 243 WHERE `iso_code` = 'CG' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 506 WHERE `iso_code` = 'CR' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 385 WHERE `iso_code` = 'HR' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 53 WHERE `iso_code` = 'CU' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 357 WHERE `iso_code` = 'CY' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 253 WHERE `iso_code` = 'DJ' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 670 WHERE `iso_code` = 'TL' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 593 WHERE `iso_code` = 'EC' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 20 WHERE `iso_code` = 'EG' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 503 WHERE `iso_code` = 'SV' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 240 WHERE `iso_code` = 'GQ' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 291 WHERE `iso_code` = 'ER' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 372 WHERE `iso_code` = 'EE' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 251 WHERE `iso_code` = 'ET' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 298 WHERE `iso_code` = 'FO' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 679 WHERE `iso_code` = 'FJ' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 241 WHERE `iso_code` = 'GA' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 220 WHERE `iso_code` = 'GM' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 995 WHERE `iso_code` = 'GE' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 233 WHERE `iso_code` = 'GH' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 299 WHERE `iso_code` = 'GL' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 350 WHERE `iso_code` = 'GI' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 590 WHERE `iso_code` = 'GP' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 502 WHERE `iso_code` = 'GT' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 224 WHERE `iso_code` = 'GN' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 245 WHERE `iso_code` = 'GW' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 592 WHERE `iso_code` = 'GY' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 509 WHERE `iso_code` = 'HT' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 379 WHERE `iso_code` = 'VA' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 504 WHERE `iso_code` = 'HN' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 354 WHERE `iso_code` = 'IS' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 91 WHERE `iso_code` = 'IN' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 62 WHERE `iso_code` = 'ID' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 98 WHERE `iso_code` = 'IR' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 964 WHERE `iso_code` = 'IQ' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 962 WHERE `iso_code` = 'JO' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 7 WHERE `iso_code` = 'KZ' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 254 WHERE `iso_code` = 'KE' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 686 WHERE `iso_code` = 'KI' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 850 WHERE `iso_code` = 'KP' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 965 WHERE `iso_code` = 'KW' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 996 WHERE `iso_code` = 'KG' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 856 WHERE `iso_code` = 'LA' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 371 WHERE `iso_code` = 'LV' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 961 WHERE `iso_code` = 'LB' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 266 WHERE `iso_code` = 'LS' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 231 WHERE `iso_code` = 'LR' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 218 WHERE `iso_code` = 'LY' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 423 WHERE `iso_code` = 'LI' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 370 WHERE `iso_code` = 'LT' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 853 WHERE `iso_code` = 'MO' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 389 WHERE `iso_code` = 'MK' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 261 WHERE `iso_code` = 'MG' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 265 WHERE `iso_code` = 'MW' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 60 WHERE `iso_code` = 'MY' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 960 WHERE `iso_code` = 'MV' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 223 WHERE `iso_code` = 'ML' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 356 WHERE `iso_code` = 'MT' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 692 WHERE `iso_code` = 'MH' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 596 WHERE `iso_code` = 'MQ' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 222 WHERE `iso_code` = 'MR' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 36 WHERE `iso_code` = 'HU' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 262 WHERE `iso_code` = 'YT' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 52 WHERE `iso_code` = 'MX' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 691 WHERE `iso_code` = 'FM' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 373 WHERE `iso_code` = 'MD' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 377 WHERE `iso_code` = 'MC' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 976 WHERE `iso_code` = 'MN' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 382 WHERE `iso_code` = 'ME' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 212 WHERE `iso_code` = 'MA' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 258 WHERE `iso_code` = 'MZ' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 264 WHERE `iso_code` = 'NA' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 674 WHERE `iso_code` = 'NR' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 977 WHERE `iso_code` = 'NP' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 599 WHERE `iso_code` = 'AN' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 687 WHERE `iso_code` = 'NC' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 505 WHERE `iso_code` = 'NI' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 227 WHERE `iso_code` = 'NE' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 683 WHERE `iso_code` = 'NU' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 968 WHERE `iso_code` = 'OM' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 92 WHERE `iso_code` = 'PK' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 680 WHERE `iso_code` = 'PW' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 507 WHERE `iso_code` = 'PA' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 675 WHERE `iso_code` = 'PG' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 595 WHERE `iso_code` = 'PY' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 51 WHERE `iso_code` = 'PE' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 63 WHERE `iso_code` = 'PH' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 974 WHERE `iso_code` = 'QA' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 262 WHERE `iso_code` = 'RE' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 7 WHERE `iso_code` = 'RU' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 250 WHERE `iso_code` = 'RW' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 508 WHERE `iso_code` = 'PM' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 685 WHERE `iso_code` = 'WS' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 378 WHERE `iso_code` = 'SM' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 239 WHERE `iso_code` = 'ST' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 966 WHERE `iso_code` = 'SA' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 221 WHERE `iso_code` = 'SN' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 381 WHERE `iso_code` = 'RS' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 248 WHERE `iso_code` = 'SC' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 232 WHERE `iso_code` = 'SL' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 386 WHERE `iso_code` = 'SI' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 677 WHERE `iso_code` = 'SB' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 252 WHERE `iso_code` = 'SO' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 94 WHERE `iso_code` = 'LK' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 249 WHERE `iso_code` = 'SD' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 597 WHERE `iso_code` = 'SR' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 268 WHERE `iso_code` = 'SZ' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 963 WHERE `iso_code` = 'SY' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 886 WHERE `iso_code` = 'TW' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 992 WHERE `iso_code` = 'TJ' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 255 WHERE `iso_code` = 'TZ' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 66 WHERE `iso_code` = 'TH' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 690 WHERE `iso_code` = 'TK' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 676 WHERE `iso_code` = 'TO' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 216 WHERE `iso_code` = 'TN' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 90 WHERE `iso_code` = 'TR' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 993 WHERE `iso_code` = 'TM' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 688 WHERE `iso_code` = 'TV' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 256 WHERE `iso_code` = 'UG' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 380 WHERE `iso_code` = 'UA' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 971 WHERE `iso_code` = 'AE' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 598 WHERE `iso_code` = 'UY' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 998 WHERE `iso_code` = 'UZ' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 678 WHERE `iso_code` = 'VU' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 58 WHERE `iso_code` = 'VE' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 84 WHERE `iso_code` = 'VN' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 681 WHERE `iso_code` = 'WF' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 967 WHERE `iso_code` = 'YE' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 260 WHERE `iso_code` = 'ZM' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 263 WHERE `iso_code` = 'ZW' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 355 WHERE `iso_code` = 'AL' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 93 WHERE `iso_code` = 'AF' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 387 WHERE `iso_code` = 'BA' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 359 WHERE `iso_code` = 'BG' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 682 WHERE `iso_code` = 'CK' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 594 WHERE `iso_code` = 'GF' LIMIT 1

UPDATE `ps_country` SET `call_prefix` = 689 WHERE `iso_code` = 'PF' LIMIT 1

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_CONDITIONS_CMS_ID', IFNULL((SELECT `id_cms` FROM `ps_cms` WHERE `id_cms` = 3), 0), NOW(), NOW())

CREATE TEMPORARY TABLE `ps_configuration_tmp` ( `value` text )

INSERT INTO `ps_configuration_tmp` (SELECT value FROM (SELECT `value` FROM `ps_configuration` WHERE `name` = 'ps_CONDITIONS_CMS_ID') AS tmp)

UPDATE `ps_configuration` SET `value` = IF((SELECT value FROM ps_configuration_tmp), 1, 0) WHERE `name` = 'ps_CONDITIONS'

DROP TABLE ps_configuration_tmp

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_CIPHER_ALGORITHM', 0, NOW(), NOW())

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_ORDER_PROCESS_TYPE', 0, NOW(), NOW())

ALTER TABLE `ps_product` ADD `minimal_quantity` INT NOT NULL DEFAULT '1' AFTER `quantity`

ALTER TABLE `ps_product` ADD `cache_default_attribute` int(10) unsigned default NULL AFTER `indexed`

ALTER TABLE `ps_product` ADD `cache_has_attachments` TINYINT(1) NOT NULL default '0' AFTER `indexed`

ALTER TABLE `ps_product` ADD `cache_is_pack` TINYINT(1) NOT NULL default '0' AFTER `indexed`

ALTER TABLE `ps_product` ADD `available_for_order` TINYINT(1) NOT NULL DEFAULT '1' AFTER `active`

ALTER TABLE `ps_product` ADD `show_price` TINYINT(1) NOT NULL DEFAULT '1' AFTER `available_for_order`

ALTER TABLE `ps_product` ADD `online_only` TINYINT(1) NOT NULL DEFAULT '0' AFTER `on_sale`

ALTER TABLE `ps_product` ADD `condition` ENUM('new', 'used', 'refurbished') NOT NULL DEFAULT 'new' AFTER `available_for_order`

ALTER TABLE `ps_product` ADD `upc` VARCHAR( 12 ) NULL AFTER `ean13`

ALTER TABLE `ps_product_attribute` ADD `upc` VARCHAR( 12 ) NULL AFTER `ean13`

SET @defaultOOS = (SELECT value FROM `ps_configuration` WHERE name = 'PS_ORDER_OUT_OF_STOCK')

/* Set 0 for every non-attribute product */ UPDATE `ps_product` p SET `cache_default_attribute` = 0 WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps_product_attribute`)

/* First default attribute in stock */ UPDATE `ps_product` p SET `cache_default_attribute` = (SELECT `id_product_attribute` FROM `ps_product_attribute` WHERE `id_product` = p.`id_product` AND default_on = 1 AND quantity > 0 LIMIT 1) WHERE `cache_default_attribute` IS NULL

/* Then default attribute without stock if we don't care */ UPDATE `ps_product` p SET `cache_default_attribute` = (SELECT `id_product_attribute` FROM `ps_product_attribute` WHERE `id_product` = p.`id_product` AND default_on = 1 LIMIT 1) WHERE `cache_default_attribute` IS NULL AND `out_of_stock` = 1 OR `out_of_stock` = IF(@defaultOOS = 1, 2, 1)

/* Next, the default attribute can be any attribute with stock */ UPDATE `ps_product` p SET `cache_default_attribute` = (SELECT `id_product_attribute` FROM `ps_product_attribute` WHERE `id_product` = p.`id_product` AND quantity > 0 LIMIT 1) WHERE `cache_default_attribute` IS NULL

/* If there is still no default attribute, then we go back to the default one */ UPDATE `ps_product` p SET `cache_default_attribute` = (SELECT `id_product_attribute` FROM `ps_product_attribute` WHERE `id_product` = p.`id_product` AND default_on = 1 LIMIT 1) WHERE `cache_default_attribute` IS NULL

UPDATE `ps_product` p SET cache_is_pack = (SELECT IF(COUNT(*) > 0, 1, 0) FROM `ps_pack` pp WHERE pp.`id_product_pack` = p.`id_product`), cache_has_attachments = (SELECT IF(COUNT(*) > 0, 1, 0) FROM `ps_product_attachment` pa WHERE pa.`id_product` = p.`id_product`)

INSERT INTO `ps_hook` (`name`, `title`, `description`, `position`) VALUES ('deleteProductAttribute', 'Product Attribute Deletion', NULL, 0)

INSERT INTO `ps_hook` (`name` ,`title` ,`description` ,`position`) VALUES ('beforeCarrier', 'Before carrier list', 'This hook is display before the carrier list on Front office', 1)

INSERT INTO `ps_hook` (`name`, `title`, `description`, `position`) VALUES ('orderDetailDisplayed', 'Order detail displayed', 'Displayed on order detail on front office', 1)

INSERT INTO `ps_hook_module` (`id_module`, `id_hook`, `position`) VALUES ((SELECT IFNULL((SELECT `id_module` FROM `ps_module` WHERE `name` = 'mailalerts'), 0)), (SELECT `id_hook` FROM `ps_hook` WHERE `name` = 'deleteProductAttribute'), 1)

DELETE FROM `ps_hook_module` WHERE `id_module` = 0

ALTER TABLE `ps_country` ADD `need_zip_code` TINYINT(1) NOT NULL DEFAULT '1'

ALTER TABLE `ps_country` ADD `zip_code_format` VARCHAR(12) NOT NULL DEFAULT ''

ALTER TABLE `ps_product` ADD `unit_price` DECIMAL(20,6) NOT NULL DEFAULT '0.000000' AFTER `wholesale_price`

ALTER TABLE `ps_product` ADD `unity` VARCHAR(10) NOT NULL DEFAULT '0.000000' AFTER `unit_price`

ALTER TABLE `ps_product_attribute` ADD `unit_price_impact` DECIMAL(17,2) NOT NULL DEFAULT '0.00' AFTER `weight`

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_VOLUME_UNIT', 'cl', NOW(), NOW())

ALTER TABLE `ps_carrier` ADD `shipping_external` TINYINT( 1 ) UNSIGNED NOT NULL

ALTER TABLE `ps_carrier` ADD `external_module_name` varchar(64) DEFAULT NULL

ALTER TABLE `ps_carrier` ADD `need_range` TINYINT( 1 ) UNSIGNED NOT NULL

INSERT INTO `ps_hook` (`name`, `title`, `description`, `position`) VALUES ('processCarrier', 'Carrier Process', NULL, 0)

INSERT INTO `ps_hook` (`name`, `title`, `description`, `position`) VALUES ('orderDetail', 'Order Detail', 'To set the follow-up in smarty when order detail is called', 0)

INSERT INTO `ps_hook` (`name`, `title`, `description`, `position`) VALUES ('paymentCCAdded', 'Payment CC added', 'Payment CC added', '0')

INSERT INTO `ps_hook` (`name`, `title`, `description`, `position`) VALUES ('extraProductComparison', 'Extra Product Comparison', 'Extra Product Comparison', '0')

ALTER TABLE `ps_address` ADD `vat_number` varchar(32) NULL DEFAULT NULL AFTER `phone_mobile`

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_TAX_ADDRESS_TYPE', 'id_address_delivery', NOW(), NOW())

/* PHP:add_module_to_hook(blockpermanentlinks, header); */

/* PHP:add_module_to_hook(blockcart, header); */

/* PHP:add_module_to_hook(blockcategories, header); */

/* PHP:add_module_to_hook(blockspecials, header); */

/* PHP:add_module_to_hook(blockuserinfo, header); */

/* PHP:migrate_block_info_to_cms_block(); */

/* PHP:add_module_to_hook(blockcms, header); */

/* PHP:add_module_to_hook(blockmyaccount, header); */

ALTER TABLE `ps_product` ADD `additional_shipping_cost` DECIMAL(20,2) NOT NULL DEFAULT '0.000000' AFTER `unit_price`

ALTER TABLE `ps_currency` ADD `active` TINYINT(1) NOT NULL DEFAULT '1'

ALTER TABLE `ps_tax` ADD `active` TINYINT(1) NOT NULL DEFAULT '1'

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_ATTRIBUTE_CATEGORY_DISPLAY', 1, NOW(), NOW())

ALTER TABLE `ps_discount` ADD `cart_display` TINYINT( 4 ) NOT NULL AFTER `active` , ADD `date_add` DATETIME NOT NULL AFTER `cart_display` , ADD `date_upd` DATETIME NOT NULL AFTER `date_add`

ALTER TABLE `ps_carrier` ADD `shipping_method` INT( 2 ) NOT NULL DEFAULT '0'

CREATE TABLE `ps_stock_mvt` ( `id_stock_mvt` int(11) unsigned NOT NULL AUTO_INCREMENT, `id_product` int(11) unsigned DEFAULT NULL, `id_product_attribute` int(11) unsigned DEFAULT NULL, `id_order` int(11) unsigned DEFAULT NULL, `id_stock_mvt_reason` int(11) unsigned NOT NULL, `id_employee` int(11) unsigned NOT NULL, `quantity` int(11) NOT NULL, `date_add` datetime NOT NULL, `date_upd` datetime NOT NULL, PRIMARY KEY (`id_stock_mvt`), KEY `id_order` (`id_order`), KEY `id_product` (`id_product`), KEY `id_product_attribute` (`id_product_attribute`), KEY `id_stock_mvt_reason` (`id_stock_mvt_reason`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_stock_mvt' already exists

CREATE TABLE `ps_stock_mvt_reason` ( `id_stock_mvt_reason` int(11) NOT NULL AUTO_INCREMENT, `date_add` datetime NOT NULL, `date_upd` datetime NOT NULL, PRIMARY KEY (`id_stock_mvt_reason`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_stock_mvt_reason' already exists

ALTER TABLE `ps_product` CHANGE `quantity` `quantity` INT( 10 ) NOT NULL DEFAULT '0'

ALTER TABLE `ps_product_attribute` CHANGE `quantity` `quantity` INT( 10 ) NOT NULL DEFAULT '0'

CREATE TABLE `ps_stock_mvt_reason_lang` ( `id_stock_mvt_reason` int(11) NOT NULL, `id_lang` int(11) NOT NULL, `name` varchar(255) CHARACTER SET utf8 NOT NULL, PRIMARY KEY (`id_stock_mvt_reason`,`id_lang`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_stock_mvt_reason_lang' already exists

INSERT INTO `ps_stock_mvt_reason` (`id_stock_mvt_reason`, `date_add`, `date_upd`) VALUES (1, NOW(), NOW()), (2, NOW(), NOW()), (3, NOW(), NOW())
(1062) Duplicate entry '1' for key 1

INSERT INTO `ps_stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `name`) VALUES (1, 1, 'Order'), (1, 2, 'Commande'), (2, 1, 'Missing Stock Movement'), (2, 2, 'Mouvement de stock manquant'), (3, 1, 'Restocking'), (3, 2, 'Réassort')
(1062) Duplicate entry '1-1' for key 1

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_COMPARATOR_MAX_ITEM', 0, NOW(), NOW())

ALTER TABLE `ps_meta_lang` ADD `url_rewrite` VARCHAR( 255 ) NOT NULL , ADD INDEX ( `url_rewrite` )

INSERT INTO `ps_meta` (`page`) VALUES ('address')

INSERT INTO `ps_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES (1, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'address'), 'Address', 'address'), (2, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'address'), 'Adresse', 'adresse'), (3, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'address'), 'Dirección', 'direccion')

INSERT INTO `ps_meta` (`page`) VALUES ('addresses')

INSERT INTO `ps_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES (1, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'addresses'), 'Addresses', 'addresses'), (2, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'addresses'), 'Adresses', 'adresses'), (3, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'addresses'), 'Direcciones', 'direcciones')

INSERT INTO `ps_meta` (`page`) VALUES ('authentication')

INSERT INTO `ps_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES (1, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'authentication'), 'Authentication', 'authentication'), (2, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'authentication'), 'Authentification', 'authentification'), (3, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'authentication'), 'Autenticación', 'autenticacion')

INSERT INTO `ps_meta` (`page`) VALUES ('cart')

INSERT INTO `ps_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES (1, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'cart'), 'Cart', 'cart'), (2, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'cart'), 'Panier', 'panier'), (3, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'cart'), 'Carro de la compra', 'carro-de-la-compra')

INSERT INTO `ps_meta` (`page`) VALUES ('discount')

INSERT INTO `ps_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES (1, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'discount'), 'Discount', 'discount'), (2, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'discount'), 'Bons de réduction', 'bons-de-reduction'), (3, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'discount'), 'Descuento', 'descuento')

INSERT INTO `ps_meta` (`page`) VALUES ('history')

INSERT INTO `ps_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES (1, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'history'), 'Order history', 'order-history'), (2, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'history'), 'Historique des commandes', 'historique-des-commandes'), (3, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'history'), 'Historial de pedidos', 'historial-de-pedidos')

INSERT INTO `ps_meta` (`page`) VALUES ('identity')

INSERT INTO `ps_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES (1, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'identity'), 'Identity', 'identity'), (2, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'identity'), 'Identité', 'identite'), (3, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'identity'), 'Identidad', 'identidad')

INSERT INTO `ps_meta` (`page`) VALUES ('my-account')

INSERT INTO `ps_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES (1, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'my-account'), 'My account', 'my-account'), (2, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'my-account'), 'Mon compte', 'mon-compte'), (3, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'my-account'), 'Mi Cuenta', 'mi-cuenta')

INSERT INTO `ps_meta` (`page`) VALUES ('order-follow')

INSERT INTO `ps_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES (1, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'order-follow'), 'Order follow', 'order-follow'), (2, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'order-follow'), 'Détails de la commande', 'details-de-la-commande'), (3, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'order-follow'), 'Devolución de productos', 'devolucion-de-productos')

INSERT INTO `ps_meta` (`page`) VALUES ('order-slip')

INSERT INTO `ps_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES (1, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'order-slip'), 'Order slip', 'order-slip'), (2, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'order-slip'), 'Avoirs', 'avoirs'), (3, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'order-slip'), 'Vales', 'vales')

INSERT INTO `ps_meta` (`page`) VALUES ('order')

INSERT INTO `ps_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES (1, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'order'), 'Order', 'order'), (2, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'order'), 'Commande', 'commande'), (3, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'order'), 'Carrito', 'carrito')

INSERT INTO `ps_meta` (`page`) VALUES ('search')

INSERT INTO `ps_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES (1, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'search'), 'Search', 'search'), (2, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'search'), 'Recherche', 'recherche'), (3, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'search'), 'Buscar', 'buscar')

INSERT INTO `ps_meta` (`page`) VALUES ('stores')

INSERT INTO `ps_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES (1, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'stores'), 'Stores', 'stores'), (2, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'stores'), 'Magagins', 'magasins'), (3, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'stores'), 'Tiendas', 'tiendas')

ALTER TABLE `ps_manufacturer` ADD `active` tinyint(1) NOT NULL default 0

ALTER TABLE `ps_supplier` ADD `active` tinyint(1) NOT NULL default 0

UPDATE `ps_manufacturer` SET `active` = 1

UPDATE `ps_supplier` SET `active` = 1

ALTER TABLE `ps_cms` ADD `active` tinyint(1) unsigned NOT NULL default 0

UPDATE `ps_cms` SET `active` = 1

ALTER TABLE `ps_cart` ADD `secure_key` varchar(32) NOT NULL default '-1' AFTER `id_guest`

ALTER TABLE `ps_order_detail` ADD `product_upc` varchar(12) default NULL AFTER `product_ean13`

ALTER TABLE `ps_discount` ADD `id_group` int(10) unsigned NOT NULL default 0

CREATE TABLE `ps_store` ( `id_store` int(10) unsigned NOT NULL AUTO_INCREMENT, `id_country` int(10) unsigned NOT NULL, `id_state` int(10) unsigned DEFAULT NULL, `name` varchar(128) NOT NULL, `address1` varchar(128) NOT NULL, `address2` varchar(128) DEFAULT NULL, `city` varchar(64) NOT NULL, `postcode` varchar(12) NOT NULL, `latitude` float(10,6) DEFAULT NULL, `longitude` float(10,6) DEFAULT NULL, `hours` varchar(254) DEFAULT NULL, `phone` varchar(16) DEFAULT NULL, `fax` varchar(16) DEFAULT NULL, `email` varchar(128) DEFAULT NULL, `note` text, `active` tinyint(1) unsigned NOT NULL DEFAULT '0', `date_add` datetime NOT NULL, `date_upd` datetime NOT NULL, PRIMARY KEY (`id_store`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_store' already exists

INSERT INTO `ps_hook` (`name`, `title`, `description`, `position`) VALUES ('categoryAddition', '', 'Temporary hook. Must NEVER be used. Will soon be replaced by a generic CRUD hook system.', 0), ('categoryUpdate', '', 'Temporary hook. Must NEVER be used. Will soon be replaced by a generic CRUD hook system.', 0), ('categoryDeletion', '', 'Temporary hook. Must NEVER be used. Will soon be replaced by a generic CRUD hook system.', 0)

/* PHP:add_module_to_hook(blockcategories, categoryAddition); */

/* PHP:add_module_to_hook(blockcategories, categoryUpdate); */

/* PHP:add_module_to_hook(blockcategories, categoryDeletion); */

DELETE FROM `ps_hook_module` WHERE `id_module` = 0

CREATE TABLE `ps_required_field` ( `id_required_field` int(11) NOT NULL AUTO_INCREMENT, `object_name` varchar(32) NOT NULL, `field_name` varchar(32) NOT NULL, PRIMARY KEY (`id_required_field`), KEY `object_name` (`object_name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_required_field' already exists

CREATE TABLE `ps_memcached_servers` ( `id_memcached_server` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , `ip` VARCHAR( 254 ) NOT NULL , `port` INT(11) UNSIGNED NOT NULL , `weight` INT(11) UNSIGNED NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_memcached_servers' already exists

CREATE TABLE `ps_webservice_account` ( `id_webservice_account` int(11) NOT NULL AUTO_INCREMENT, `key` varchar(32) NOT NULL, `active` tinyint(2) NOT NULL, PRIMARY KEY (`id_webservice_account`), KEY `key` (`key`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_webservice_account' already exists

CREATE TABLE `ps_webservice_permission` ( `id_webservice_permission` int(11) NOT NULL AUTO_INCREMENT, `resource` varchar(50) NOT NULL, `method` enum('GET','POST','PUT','DELETE') NOT NULL, `id_webservice_account` int(11) NOT NULL, PRIMARY KEY (`id_webservice_permission`), UNIQUE KEY `resource_2` (`resource`,`method`,`id_webservice_account`), KEY `resource` (`resource`), KEY `method` (`method`), KEY `id_webservice_account` (`id_webservice_account`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_webservice_permission' already exists

/* PHP */ /* PHP:editorial_update(); */

/* PHP:reorderpositions(); */

/* PHP:update_image_size_in_db(); */

/* PHP:update_order_details(); */

/* PHP:add_new_tab(AdminInformation, en:Configuration Information|fr:Informations|es:Informations|it:Informazioni di configurazione|de:Konfigurationsinformationen, 9); */

/* PHP:add_new_tab(AdminCustomerThreads, en:Customer Service|de:Kundenservice|fr:SAV|es:Servicio al cliente|it:Servizio clienti, 29); */

/* PHP:add_new_tab(AdminAddonsCatalog, fr:Catalogue de modules et thèmes|de:Module und Themenkatalog|en:Modules & Themes Catalog|it:Moduli & Temi catalogo, 7); */

/* PHP:add_new_tab(AdminAddonsMyAccount, it:Il mio Account|de:Mein Konto|fr:Mon compte|en:My Account, 7); */

/* PHP:add_new_tab(AdminPerformance, de:Leistung|en:Performance|it:Performance|fr:Performances|es:Rendimiento, 8); */

/* PHP:add_new_tab(AdminThemes, es:Temas|it:Temi|de:Themen|en:Themes|fr:Thèmes, 7); */

/* PHP:add_new_tab(AdminWebservice, fr:Service web|es:Web service|en:Webservice|de:Webservice|it:Webservice, 9); */

SET NAMES 'utf8'

CREATE TABLE IF NOT EXISTS `ps_country_tax` ( `id_country_tax` int(11) NOT NULL AUTO_INCREMENT, `id_country` int(11) NOT NULL, `id_tax` int(11) NOT NULL, PRIMARY KEY (`id_country_tax`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8

CREATE TABLE IF NOT EXISTS `ps_product_country_tax` ( `id_product` int(11) NOT NULL, `id_country` int(11) NOT NULL, `id_tax` int(11) NOT NULL, UNIQUE KEY `id_product` (`id_product`,`id_country`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8

DELETE FROM `ps_tab` WHERE `class_name` = 'AdminStatsModules' LIMIT 1

DELETE FROM `ps_tab_lang` WHERE `id_tab` NOT IN (SELECT id_tab FROM `ps_tab`)

DELETE FROM `ps_access` WHERE `id_tab` NOT IN (SELECT id_tab FROM `ps_tab`)

INSERT INTO `ps_module` (`name`, `active`) VALUES ('statsforecast', 1)

INSERT INTO `ps_hook_module` (`id_module`, `id_hook` , `position`) (SELECT id_module, 32, (SELECT max_position from (SELECT MAX(position)+1 as max_position FROM `ps_hook_module` WHERE `id_hook` = 32) tmp) FROM `ps_module` WHERE `name` = 'statsforecast')

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_GEOLOCATION_ENABLED', '0', NOW(), NOW()), ('PS_ALLOWED_COUNTRIES', 'AF;ZA;AX;AL;DZ;DE;AD;AO;AI;AQ;AG;AN;SA;AR;AM;AW;AU;AT;AZ;BS;BH;BD;BB;BY;BE;BZ;BJ;BM;BT;BO;BA;BW;BV;BR;BN;BG;BF;MM;BI;KY;KH;CM;CA;CV;CF;CL;CN;CX;CY;CC;CO;KM;CG;CD;CK;KR;KP;CR;CI;HR;CU;DK;DJ;DM;EG;IE;SV;AE;EC;ER;ES;EE;ET;FK;FO;FJ;FI;FR;GA;GM;GE;GS;GH;GI;GR;GD;GL;GP;GU;GT;GG;GN;GQ;GW;GY;GF;HT;HM;HN;HK;HU;IM;MU;VG;VI;IN;ID;IR;IQ;IS;IL;IT;JM;JP;JE;JO;KZ;KE;KG;KI;KW;LA;LS;LV;LB;LR;LY;LI;LT;LU;MO;MK;MG;MY;MW;MV;ML;MT;MP;MA;MH;MQ;MR;YT;MX;FM;MD;MC;MN;ME;MS;MZ;NA;NR;NP;NI;NE;NG;NU;NF;NO;NC;NZ;IO;OM;UG;UZ;PK;PW;PS;PA;PG;PY;NL;PE;PH;PN;PL;PF;PR;PT;QA;DO;CZ;RE;RO;UK;RU;RW;EH;BL;KN;SM;MF;PM;VA;VC;LC;SB;WS;AS;ST;SN;RS;SC;SL;SG;SK;SI;SO;SD;LK;SE;CH;SR;SJ;SZ;SY;TJ;TW;TZ;TD;TF;TH;TL;TG;TK;TO;TT;TN;TM;TC;TR;TV;UA;UY;US;VU;VE;VN;WF;YE;ZM;ZW', NOW(), NOW()), ('PS_GEOLOCATION_BEHAVIOR', '0', NOW(), NOW())

ALTER TABLE `ps_orders` ADD `conversion_rate` decimal(13,6) NOT NULL default 1 AFTER `payment`

UPDATE `ps_orders` o SET o.`conversion_rate` = IFNULL(( SELECT c.`conversion_rate` FROM `ps_currency` c WHERE c.`id_currency` = o.`id_currency` LIMIT 1), 0 )

ALTER TABLE `ps_order_slip` ADD `conversion_rate` decimal(13,6) NOT NULL default 1 AFTER `id_order`

UPDATE `ps_order_slip` os SET os.`conversion_rate` = IFNULL(( SELECT o.`conversion_rate` FROM `ps_orders` o WHERE os.`id_order` = o.`id_order` LIMIT 1), 0 )

UPDATE `ps_configuration` SET `value` = 'gridhtml' WHERE `name` = 'PS_STATS_GRID_RENDER' LIMIT 1

UPDATE `ps_module` SET `name` = 'gridhtml' WHERE `name` = 'gridextjs' LIMIT 1

ALTER TABLE `ps_attachment` CHANGE `mime` `mime` varchar(64) NOT NULL

ALTER TABLE `ps_attachment` ADD `file_name` varchar(128) NOT NULL default '' AFTER `file`

UPDATE `ps_attachment` a SET `file_name` = ( SELECT `name` FROM `ps_attachment_lang` al WHERE al.`id_attachment` = a.`id_attachment` AND al.`id_lang` = ( SELECT `value` FROM `ps_configuration` WHERE `name` = 'PS_LANG_DEFAULT') )

UPDATE `ps_tab` SET `class_name` = 'AdminCMSContent' WHERE `class_name` = 'AdminCMS' LIMIT 1

SET @id_timezone = (SELECT `name` FROM `ps_timezone` WHERE `id_timezone` = (SELECT `value` FROM `ps_configuration` WHERE `name` = 'PS_TIMEZONE' LIMIT 1) LIMIT 1)

UPDATE `ps_configuration` SET `value` = @id_timezone WHERE `name` = "PS_TIMEZONE" LIMIT 1

ALTER TABLE `ps_country` ADD `id_currency` INT NOT NULL DEFAULT '0' AFTER `id_zone`

/* PHP */ /* PHP:group_reduction_column_fix(); */

/* PHP:ecotax_tax_application_fix(); */

/* PHP:cms_block(); */

/* PHP:add_new_tab(AdminGeolocation, es:Geolocalización|it:Geolocalizzazione|en:Geolocation|de:Geotargeting|fr:Géolocalisation, 8); */

SET NAMES 'utf8'

ALTER TABLE `ps_product` CHANGE `ecotax` `ecotax` DECIMAL(21, 6) NOT NULL DEFAULT '0.00'

/* PHP:move_crossselling(); */

UPDATE `ps_cms` SET `id_cms_category` = 1

/* PHP:add_new_tab(AdminStores, fr:Magasins|es:Tiendas|en:Stores|de:Shops|it:Negozi, 9); */

INSERT IGNORE INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) SELECT 'PS_LOCALE_LANGUAGE', l.`iso_code`, NOW(), NOW() FROM `ps_configuration` c INNER JOIN `ps_lang` l ON (l.`id_lang` = c.`value`) WHERE c.`name` = 'PS_LANG_DEFAULT'

INSERT IGNORE INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) SELECT 'PS_LOCALE_COUNTRY', co.`iso_code`, NOW(), NOW() FROM `ps_configuration` c INNER JOIN `ps_country` co ON (co.`id_country` = c.`value`) WHERE c.`name` = 'PS_COUNTRY_DEFAULT'

/* PHP:reorderpositions(); */

ALTER TABLE `ps_webservice_permission` CHANGE `method` `method` ENUM( 'GET', 'POST', 'PUT', 'DELETE', 'HEAD' ) NOT NULL

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_ATTACHMENT_MAXIMUM_SIZE', '2', NOW(), NOW()), ('PS_SMARTY_CACHE', '1', NOW(), NOW())

ALTER TABLE `ps_product_attribute` CHANGE `price` `price` decimal(20,6) NOT NULL default '0.000000'

UPDATE `ps_product_attribute` pa SET pa.`price` = pa.`price` / (1 + IFNULL((SELECT t.`rate` FROM `ps_tax` t INNER JOIN `ps_product` p ON (p.`id_tax` = t.`id_tax`) WHERE p.`id_product` = pa.`id_product`) ,0) / 100)

SET NAMES 'utf8'

SET @alias = (SELECT IFNULL((SELECT `id_tab` FROM `ps_tab` WHERE `class_name` = "AdminAliases" LIMIT 1), '0'))

UPDATE `ps_tab` SET `id_parent` = 8 WHERE `id_tab` = @alias LIMIT 1

SET @stores = (SELECT IFNULL((SELECT `id_tab` FROM `ps_tab` WHERE `class_name` = "AdminStores" LIMIT 1), '0'))

UPDATE `ps_tab` SET `id_parent` = 9 WHERE `id_tab` = @stores LIMIT 1

SET @pdf = (SELECT IFNULL((SELECT `id_tab` FROM `ps_tab` WHERE `class_name` = "AdminPDF" LIMIT 1), '0'))

UPDATE `ps_tab` SET `id_parent` = 3 WHERE `id_tab` = @pdf LIMIT 1

SET @tabs = (SELECT IFNULL((SELECT `id_tab` FROM `ps_tab` WHERE `class_name` = "AdminTabs" LIMIT 1), '0'))

UPDATE `ps_tab` SET `id_parent` = 29 WHERE `id_tab` = @tabs LIMIT 1

ALTER TABLE `ps_image_type` ADD `stores` tinyint(1) NOT NULL default '1'

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_FORCE_SMARTY_2', '0', NOW(), NOW()), ('PS_DIMENSION_UNIT', 'cm', NOW(), NOW())

ALTER TABLE `ps_product` ADD `width` FLOAT NOT NULL AFTER `location`, ADD `height` FLOAT NOT NULL AFTER `width`, ADD `depth` FLOAT NOT NULL AFTER `height`

SET @id_module = (SELECT IFNULL((SELECT `id_module` FROM `ps_module` WHERE `name` = "statshome" LIMIT 1), '0'))

DELETE FROM `ps_module` WHERE `id_module` = @id_module

DELETE FROM `ps_hook_module` WHERE `id_module` = @id_module

ALTER TABLE `ps_customer` ADD `is_guest` TINYINT(1) NOT NULL DEFAULT '0' AFTER `deleted`

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_GUEST_CHECKOUT_ENABLED', '0', NOW(), NOW())

ALTER TABLE `ps_category` ADD `nleft` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `level_depth`

ALTER TABLE `ps_category` ADD `nright` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `nleft`

ALTER TABLE `ps_category` ADD INDEX `nleftright` (`nleft`, `nright`)

ALTER TABLE `ps_product` ADD `id_tax_rules_group` int(10) unsigned NOT NULL AFTER `id_tax`

ALTER TABLE `ps_carrier` ADD `id_tax_rules_group` int(10) unsigned NOT NULL AFTER `id_tax`

ALTER TABLE `ps_carrier` ADD INDEX ( `id_tax_rules_group` )

CREATE TABLE `ps_tax_rule` ( `id_tax_rules_group` INT NOT NULL , `id_country` INT NOT NULL , `id_state` INT NOT NULL , `id_tax` INT NOT NULL , `state_behavior` INT NOT NULL , PRIMARY KEY ( `id_tax_rules_group`, `id_country` , `id_state` ) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_tax_rule' already exists

CREATE TABLE `ps_tax_rules_group` ( `id_tax_rules_group` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `name` VARCHAR( 32 ) NOT NULL , `active` INT NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_tax_rules_group' already exists

CREATE TABLE IF NOT EXISTS `ps_help_access` ( `id_help_access` int(11) NOT NULL AUTO_INCREMENT, `label` varchar(45) NOT NULL, `version` varchar(8) NOT NULL, PRIMARY KEY (`id_help_access`), UNIQUE KEY `label` (`label`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8

/* PHP:add_new_tab(AdminTaxRulesGroup, it:Regimi fiscali|es:Reglas de Impuestos|fr:Règles de taxes|de:Steuerregeln|en:Tax Rules, 4); */

/* PHP:generate_ntree(); */

/* PHP:generate_tax_rules(); */

/* PHP:id_currency_country_fix(); */

/* PHP:update_modules_sql(); */

ALTER TABLE `ps_product` DROP `id_tax`

ALTER TABLE `ps_carrier` DROP `id_tax`

DROP TABLE `ps_tax_state`, `ps_tax_zone`, `ps_country_tax`

ALTER TABLE `ps_orders` ADD `carrier_tax_rate` DECIMAL(10, 3) NOT NULL default '0.00' AFTER `total_shipping`

INSERT INTO `ps_hook` (`id_hook`, `name`, `title`, `description`, `position`) VALUES (NULL, 'beforeAuthentication', 'Before Authentication', 'Before authentication', 0)

SET NAMES 'utf8'

ALTER TABLE `ps_customer` DROP INDEX `customer_email`

ALTER TABLE `ps_customer` ADD INDEX `customer_email` (`email`)

ALTER TABLE `ps_lang` ADD `language_code` char(5) NULL AFTER `iso_code`

UPDATE `ps_lang` SET language_code = iso_code

ALTER TABLE `ps_lang` MODIFY `language_code` char(5) NOT NULL

DELETE FROM `ps_module` WHERE `name` = 'gridextjs' LIMIT 1

DELETE FROM `ps_hook_module` WHERE `id_module` NOT IN (SELECT id_module FROM `ps_module`)

UPDATE `ps_configuration` SET `value` = 'gridhtml' WHERE `name` = 'PS_STATS_GRID_RENDER' AND `value` = 'gridextjs' LIMIT 1

SET NAMES 'utf8'

ALTER TABLE `ps_product_attribute` ADD `minimal_quantity` int(10) unsigned NOT NULL DEFAULT '1' AFTER `default_on`

ALTER TABLE `ps_orders` ADD `reference` VARCHAR(14) NOT NULL AFTER `id_address_invoice`

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES('PS_DISPLAY_SUPPLIERS', '1', NOW(), NOW())

/* PHP:update_products_ecotax_v133(); */

SET NAMES 'utf8'

CREATE TEMPORARY TABLE `ps_tab_tmp1` ( `id_parent` int(11) )

INSERT INTO `ps_tab_tmp1` (SELECT * FROM (SELECT `id_parent` FROM `ps_tab` WHERE `class_name` = 'AdminTaxes') AS tmp)

CREATE TEMPORARY TABLE `ps_tab_tmp2` ( `position` int(10) )

INSERT INTO `ps_tab_tmp2` (SELECT * FROM (SELECT `position` FROM `ps_tab` WHERE `class_name` = 'AdminTaxes') AS tmp2)

UPDATE `ps_tab` SET `position` = `position` + 1 WHERE `id_parent` = (SELECT id_parent FROM ps_tab_tmp1 AS tmp) AND `position` > (SELECT position FROM ps_tab_tmp2 AS tmp2)

DROP TABLE ps_tab_tmp1

DROP TABLE ps_tab_tmp2

CREATE TEMPORARY TABLE `ps_tab_tmp` ( `position` int(10) )

INSERT INTO `ps_tab_tmp` (SELECT * FROM (SELECT `position` FROM `ps_tab` WHERE `class_name` = 'AdminTaxes') AS tmp)

UPDATE `ps_tab` SET `position` = (SELECT position FROM ps_tab_tmp tmp) + 1 WHERE `class_name` = 'AdminTaxRulesGroup'

DROP TABLE ps_tab_tmp

UPDATE `ps_hook` SET `title` = 'Category creation', description = '' WHERE `name` = 'categoryAddition' LIMIT 1

UPDATE `ps_hook` SET `title` = 'Category modification', description = '' WHERE `name` = 'categoryUpdate' LIMIT 1

UPDATE `ps_hook` SET `title` = 'Category removal', description = '' WHERE `name` = 'categoryDeletion' LIMIT 1

DELETE FROM `ps_module` WHERE `name` = 'canonicalurl' LIMIT 1

DELETE FROM `ps_hook_module` WHERE `id_module` NOT IN (SELECT id_module FROM `ps_module`)

/* PHP:gridextjs_deprecated(); */

/* PHP:shop_url(); */

/* PHP:updateproductcomments(); */

SET NAMES 'utf8'

CREATE TABLE `ps_specific_price_priority` ( `id_specific_price_priority` INT NOT NULL AUTO_INCREMENT , `id_product` INT NOT NULL , `priority` VARCHAR( 80 ) NOT NULL , PRIMARY KEY ( `id_specific_price_priority` , `id_product` ) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_specific_price_priority' already exists

ALTER TABLE `ps_product` ADD `unit_price_ratio` DECIMAL(20, 6) NOT NULL default '0.00' AFTER `unit_price`

UPDATE `ps_product` SET `unit_price_ratio` = IF (`unit_price` != 0, `price` / `unit_price`, 0)

ALTER TABLE `ps_product` DROP `unit_price`

ALTER TABLE `ps_discount` ADD `behavior_not_exhausted` TINYINT(3) DEFAULT '1' AFTER `id_discount_type`

SET NAMES 'utf8'

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_CATALOG_MODE', '0', NOW(), NOW())

ALTER TABLE `ps_specific_price` DROP `priority`
(1091) Can't DROP 'priority'; check that column/key exists

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_GEOLOCATION_WHITELIST', '209.185.108;209.185.253;209.85.238;209.85.238.11;209.85.238.4;216.239.33.96;216.239.33.97;216.239.33.98;216.239.33.99;216.239.37.98;216.239.37.99;216.239.39.98;216.239.39.99;216.239.41.96;216.239.41.97;216.239.41.98;216.239.41.99;216.239.45.4;216.239.46;216.239.51.96;216.239.51.97;216.239.51.98;216.239.51.99;216.239.53.98;216.239.53.99;216.239.57.96;216.239.57.97;216.239.57.98;216.239.57.99;216.239.59.98;216.239.59.99;216.33.229.163;64.233.173.193;64.233.173.194;64.233.173.195;64.233.173.196;64.233.173.197;64.233.173.198;64.233.173.199;64.233.173.200;64.233.173.201;64.233.173.202;64.233.173.203;64.233.173.204;64.233.173.205;64.233.173.206;64.233.173.207;64.233.173.208;64.233.173.209;64.233.173.210;64.233.173.211;64.233.173.212;64.233.173.213;64.233.173.214;64.233.173.215;64.233.173.216;64.233.173.217;64.233.173.218;64.233.173.219;64.233.173.220;64.233.173.221;64.233.173.222;64.233.173.223;64.233.173.224;64.233.173.225;64.233.173.226;64.233.173.227;64.233.173.228;64.233.173.229;64.233.173.230;64.233.173.231;64.233.173.232;64.233.173.233;64.233.173.234;64.233.173.235;64.233.173.236;64.233.173.237;64.233.173.238;64.233.173.239;64.233.173.240;64.233.173.241;64.233.173.242;64.233.173.243;64.233.173.244;64.233.173.245;64.233.173.246;64.233.173.247;64.233.173.248;64.233.173.249;64.233.173.250;64.233.173.251;64.233.173.252;64.233.173.253;64.233.173.254;64.233.173.255;64.68.80;64.68.81;64.68.82;64.68.83;64.68.84;64.68.85;64.68.86;64.68.87;64.68.88;64.68.89;64.68.90.1;64.68.90.10;64.68.90.11;64.68.90.12;64.68.90.129;64.68.90.13;64.68.90.130;64.68.90.131;64.68.90.132;64.68.90.133;64.68.90.134;64.68.90.135;64.68.90.136;64.68.90.137;64.68.90.138;64.68.90.139;64.68.90.14;64.68.90.140;64.68.90.141;64.68.90.142;64.68.90.143;64.68.90.144;64.68.90.145;64.68.90.146;64.68.90.147;64.68.90.148;64.68.90.149;64.68.90.15;64.68.90.150;64.68.90.151;64.68.90.152;64.68.90.153;64.68.90.154;64.68.90.155;64.68.90.156;64.68.90.157;64.68.90.158;64.68.90.159;64.68.90.16;64.68.90.160;64.68.90.161;64.68.90.162;64.68.90.163;64.68.90.164;64.68.90.165;64.68.90.166;64.68.90.167;64.68.90.168;64.68.90.169;64.68.90.17;64.68.90.170;64.68.90.171;64.68.90.172;64.68.90.173;64.68.90.174;64.68.90.175;64.68.90.176;64.68.90.177;64.68.90.178;64.68.90.179;64.68.90.18;64.68.90.180;64.68.90.181;64.68.90.182;64.68.90.183;64.68.90.184;64.68.90.185;64.68.90.186;64.68.90.187;64.68.90.188;64.68.90.189;64.68.90.19;64.68.90.190;64.68.90.191;64.68.90.192;64.68.90.193;64.68.90.194;64.68.90.195;64.68.90.196;64.68.90.197;64.68.90.198;64.68.90.199;64.68.90.2;64.68.90.20;64.68.90.200;64.68.90.201;64.68.90.202;64.68.90.203;64.68.90.204;64.68.90.205;64.68.90.206;64.68.90.207;64.68.90.208;64.68.90.21;64.68.90.22;64.68.90.23;64.68.90.24;64.68.90.25;64.68.90.26;64.68.90.27;64.68.90.28;64.68.90.29;64.68.90.3;64.68.90.30;64.68.90.31;64.68.90.32;64.68.90.33;64.68.90.34;64.68.90.35;64.68.90.36;64.68.90.37;64.68.90.38;64.68.90.39;64.68.90.4;64.68.90.40;64.68.90.41;64.68.90.42;64.68.90.43;64.68.90.44;64.68.90.45;64.68.90.46;64.68.90.47;64.68.90.48;64.68.90.49;64.68.90.5;64.68.90.50;64.68.90.51;64.68.90.52;64.68.90.53;64.68.90.54;64.68.90.55;64.68.90.56;64.68.90.57;64.68.90.58;64.68.90.59;64.68.90.6;64.68.90.60;64.68.90.61;64.68.90.62;64.68.90.63;64.68.90.64;64.68.90.65;64.68.90.66;64.68.90.67;64.68.90.68;64.68.90.69;64.68.90.7;64.68.90.70;64.68.90.71;64.68.90.72;64.68.90.73;64.68.90.74;64.68.90.75;64.68.90.76;64.68.90.77;64.68.90.78;64.68.90.79;64.68.90.8;64.68.90.80;64.68.90.9;64.68.91;64.68.92;66.249.64;66.249.65;66.249.66;66.249.67;66.249.68;66.249.69;66.249.70;66.249.71;66.249.72;66.249.73;66.249.78;66.249.79;72.14.199;8.6.48', NOW(), NOW())

ALTER TABLE `ps_address` ADD `dni` VARCHAR(16) NULL AFTER `vat_number`

UPDATE `ps_address` a SET `dni` = ( SELECT `dni` FROM `ps_customer` c WHERE c.`id_customer` = a.`id_customer` )

ALTER TABLE `ps_customer` DROP `dni`

INSERT INTO `ps_hook` (`name`, `title`, `description`, `position`) VALUES ('paymentTop', 'Top of payment page', 'Top of payment page', 0)

CREATE TEMPORARY TABLE `ps_tab_tmp` ( `position` int(10) )

INSERT INTO `ps_tab_tmp` (SELECT * FROM (SELECT `position` FROM `ps_tab` WHERE `class_name` = 'AdminTaxes') AS tmp)

UPDATE `ps_tab` SET `position` = (SELECT position FROM ps_tab_tmp tmp) + 1 WHERE `class_name` = 'AdminTaxRulesGroup'

DROP TABLE ps_tab_tmp

DELETE FROM `ps_configuration` WHERE `name` = 'PS_INVOICE_NUMBER'

CREATE TABLE `ps_log` ( `id_log` int(10) unsigned NOT NULL AUTO_INCREMENT, `severity` tinyint(1) NOT NULL, `error_code` int(11) DEFAULT NULL, `message` text NOT NULL, `object_type` varchar(32) DEFAULT NULL, `object_id` int(10) unsigned DEFAULT NULL, `date_add` datetime NOT NULL, `date_upd` datetime NOT NULL, PRIMARY KEY (`id_log`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_log' already exists

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_LOGS_BY_EMAIL', '5', NOW(), NOW())

ALTER TABLE `ps_tax_rules_group` CHANGE `name` `name` VARCHAR( 50 ) NOT NULL

CREATE TABLE `ps_import_match` ( `id_import_match` int(10) NOT NULL AUTO_INCREMENT, `name` varchar(32) NOT NULL, `match` text NOT NULL, `skip` int(2) NOT NULL, PRIMARY KEY (`id_import_match`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_import_match' already exists

/* PHP:add_new_tab(AdminLogs, en:Log|fr:Log|es:Log|de:Log|it:Log, 9); */

ALTER TABLE `ps_product` CHANGE `ecotax` `ecotax` DECIMAL( 17, 6 ) NOT NULL DEFAULT '0.00'

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_LAST_SHOP_UPDATE', NOW(), NOW(), NOW())

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_STORES_DISPLAY_SITEMAP', 1, NOW(), NOW())

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_COOKIE_CHECKIP', 1, NOW(), NOW())

SET NAMES 'utf8'

SET NAMES 'utf8'

ALTER TABLE `ps_tax_rule` DROP PRIMARY KEY
(1075) Incorrect table definition; there can be only one auto column and it must be defined as a key

ALTER TABLE `ps_tax_rule` ADD `id_tax_rule` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST
(1060) Duplicate column name 'id_tax_rule'

ALTER TABLE `ps_tax_rule` ADD INDEX ( `id_tax` )

ALTER TABLE `ps_tax_rule` ADD INDEX ( `id_tax_rules_group` )

ALTER TABLE `ps_address` MODIFY `dni` VARCHAR(16) NULL AFTER `vat_number`

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('BLOCKSTORE_IMG', 'store.jpg', NOW(), NOW()), ('PS_STORES_CENTER_LAT', '25.948969', NOW(), NOW()), ('PS_STORES_CENTER_LONG', '-80.226439', NOW(), NOW())

/* PHP:add_new_tab(AdminInformation, en:Configuration Information|fr:Informations|es:Informations|it:Informazioni di configurazione|de:Konfigurationsinformationen, 9); */

/* PHP:add_new_tab(AdminPerformance, de:Leistung|en:Performance|it:Performance|fr:Performances|es:Rendimiento, 8); */

/* PHP:add_new_tab(AdminCustomerThreads, en:Customer Service|de:Kundenservice|fr:SAV|es:Servicio al cliente|it:Servizio clienti, 29); */

/* PHP:add_new_tab(AdminWebservice, fr:Service web|es:Web service|en:Webservice|de:Webservice|it:Webservice, 9); */

/* PHP:add_new_tab(AdminAddonsCatalog, fr:Catalogue de modules et thèmes|de:Module und Themenkatalog|en:Modules & Themes Catalog|it:Moduli & Temi catalogo, 7); */

/* PHP:add_new_tab(AdminAddonsMyAccount, it:Il mio Account|de:Mein Konto|fr:Mon compte|en:My Account, 7); */

/* PHP:add_new_tab(AdminThemes, es:Temas|it:Temi|de:Themen|en:Themes|fr:Thèmes, 7); */

/* PHP:add_new_tab(AdminGeolocation, es:Geolocalización|it:Geolocalizzazione|en:Geolocation|de:Geotargeting|fr:Géolocalisation, 8); */

/* PHP:add_new_tab(AdminTaxRulesGroup, it:Regimi fiscali|es:Reglas de Impuestos|fr:Règles de taxes|de:Steuerregeln|en:Tax Rules, 4); */

/* PHP:add_new_tab(AdminLogs, en:Log|fr:Log|es:Log|de:Log|it:Log, 9); */

/* PHP:add_new_tab(AdminCounty, fr:Comtés|es:Condados|en:Counties|de:Counties|it:Counties, 5); */

ALTER TABLE `ps_tax_rule` ADD `county_behavior` INT NOT NULL AFTER `state_behavior`
(1060) Duplicate column name 'county_behavior'

ALTER TABLE `ps_tax_rule` ADD `id_county` INT NOT NULL AFTER `id_country`
(1060) Duplicate column name 'id_county'

ALTER TABLE `ps_tax_rule` ADD UNIQUE ( `id_tax_rules_group` , `id_country` , `id_state` , `id_county` )

CREATE TABLE `ps_county` ( `id_county` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(64) NOT NULL, `id_state` int(11) NOT NULL, `active` tinyint(1) NOT NULL, PRIMARY KEY (`id_county`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_county' already exists

CREATE TABLE `ps_county_zip_code` ( `id_county` INT NOT NULL , `from_zip_code` INT NOT NULL , `to_zip_code` INT NOT NULL , PRIMARY KEY ( `id_county` , `from_zip_code` , `to_zip_code` ) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_county_zip_code' already exists

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_HOMEPAGE_PHP_SELF', 'index.php', NOW(), NOW())

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_USE_ECOTAX', (SELECT IF((SELECT `ecotax` FROM `ps_product` WHERE `ecotax` != 0 LIMIT 1),'1','0')), NOW(), NOW())

ALTER TABLE `ps_hook` ADD `live_edit` TINYINT NOT NULL DEFAULT '0'

UPDATE `ps_hook` SET `live_edit` = '1' WHERE `ps_hook`.`name` IN ('rightColumn', 'leftColumn', 'home')

INSERT INTO `ps_hook` (`id_hook`, `name`, `title`, `description`, `position`) VALUES (NULL, 'afterCreateHtaccess', 'After htaccess creation', 'After htaccess creation', 0)

UPDATE `ps_meta_lang` SET `url_rewrite` = 'kontaktieren-sie-uns' WHERE id_meta = 3 AND id_lang = 4 AND url_rewrite = 'Kontaktieren Sie uns'

UPDATE `ps_meta_lang` SET `url_rewrite` = 'kennwort-wiederherstellung' WHERE id_meta = 7 AND id_lang = 4 AND url_rewrite = 'Kennwort Wiederherstellung'

UPDATE `ps_meta_lang` SET `url_rewrite` = 'il-mio-account' WHERE id_meta = 18 AND id_lang = 5 AND url_rewrite = 'il mio-account'

UPDATE `ps_meta_lang` SET `url_rewrite` = 'nota-di-ordine' WHERE id_meta = 20 AND id_lang = 5 AND url_rewrite = 'nota di-ordine'

INSERT INTO `ps_meta` (`page`) VALUES ('order-opc')

INSERT INTO `ps_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) ( SELECT `id_lang`, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'order-opc'), 'Order', 'quick-order' FROM `ps_lang` )

INSERT INTO `ps_meta` (`page`) VALUES ('guest-tracking')

INSERT INTO `ps_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) ( SELECT `id_lang`, (SELECT `id_meta` FROM `ps_meta` WHERE `page` = 'guest-tracking'), 'Guest tracking', 'guest-tracking' FROM `ps_lang` )

UPDATE `ps_hook` SET `live_edit` = '1' WHERE `ps_hook`.`name` IN ('productfooter', 'payment')

UPDATE `ps_configuration` SET name = 'PS_GEOLOCATION_ENABLED' WHERE name = 'PS_GEOLOCALIZATION_ENABLED'

UPDATE `ps_configuration` SET name = 'PS_GEOLOCATION_BEHAVIOR' WHERE name = 'PS_GEOLOCALIZATION_BEHAVIOR'

UPDATE `ps_configuration` SET name = 'PS_GEOLOCATION_WHITELIST' WHERE name = 'PS_GEOLOCALIZATION_WHITELIST'

UPDATE `ps_tab` SET class_name = 'AdminGeolocation' WHERE class_name = 'AdminGeolocalization'

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_CANONICAL_REDIRECT', '0', NOW(), NOW())

ALTER TABLE `ps_webservice_account` ADD `class_name` VARCHAR( 50 ) NOT NULL DEFAULT 'WebserviceRequest' AFTER `key`
(1060) Duplicate column name 'class_name'

ALTER TABLE `ps_webservice_account` ADD `description` text NULL AFTER `key`
(1060) Duplicate column name 'description'

/* PHP:add_new_tab(AdminHome, en:Home|fr:Accueil|es:Home|de:Home|it:Home, -1); */

/* PHP:add_new_tab(AdminStockMvt, de:Lagerbewegungen|fr:Mouvements de Stock|it:Movimenti magazzino|en:Stock Movements, 1); */

/* PHP:update_for_13version(); */

SET NAMES 'utf8'

ALTER TABLE `ps_stock_mvt_reason` ADD `sign` TINYINT(1) NOT NULL DEFAULT '1' AFTER `id_stock_mvt_reason`
(1060) Duplicate column name 'sign'

UPDATE `ps_stock_mvt_reason` SET `sign`=-1

UPDATE `ps_stock_mvt_reason` SET `sign`=1 WHERE `id_stock_mvt_reason`=3

UPDATE `ps_stock_mvt_reason` SET `id_stock_mvt_reason`=`id_stock_mvt_reason`+2 ORDER BY `id_stock_mvt_reason` DESC

UPDATE `ps_stock_mvt` SET `id_stock_mvt_reason`=`id_stock_mvt_reason`+2

UPDATE `ps_stock_mvt_reason_lang` SET `id_stock_mvt_reason`=`id_stock_mvt_reason`+2 ORDER BY `id_stock_mvt_reason` DESC

INSERT INTO `ps_stock_mvt_reason` (`id_stock_mvt_reason` ,`sign` ,`date_add` ,`date_upd`) VALUES ('1', '1', NOW(), NOW()), ('2', '-1', NOW(), NOW())

INSERT INTO `ps_stock_mvt_reason_lang` (`id_stock_mvt_reason` ,`id_lang` ,`name`) VALUES ('1', '1', 'Increase'), ('1', '2', 'Augmenter'), ('1', '3', 'Aumentar'), ('1', '4', 'Erhöhen'), ('1', '5', 'Aumento'), ('2', '1', 'Decrease'), ('2', '2', 'Diminuer'), ('2', '3', 'Disminuir'), ('2', '4', 'Reduzieren'), ('2', '5', 'Diminuzione')

SET NAMES 'utf8'

INSERT INTO `ps_hook` (`name`, `title`, `description`, `position`, `live_edit`) VALUES ('afterSaveAdminMeta', 'After save configuration in AdminMeta', 'After save configuration in AdminMeta', 0, 0)

ALTER TABLE `ps_webservice_account` ADD `is_module` TINYINT( 2 ) NOT NULL DEFAULT '0' AFTER `class_name` , ADD `module_name` VARCHAR( 50 ) NULL DEFAULT NULL AFTER `is_module`
(1060) Duplicate column name 'is_module'

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_IMG_UPDATE_TIME', UNIX_TIMESTAMP(), NOW(), NOW())

UPDATE `ps_cms_lang` set link_rewrite = "uber-uns" where link_rewrite like "%ber-uns"

ALTER TABLE `ps_connections` CHANGE `ip_address` `ip_address` BIGINT NULL DEFAULT NULL

UPDATE `ps_meta_lang` SET `title` = 'Angebote', `keywords` = 'besonders, Angebote', `url_rewrite` = 'angebote' WHERE url_rewrite = 'preise-fallen'

ALTER TABLE `ps_country` ADD `display_tax_label` BOOLEAN NOT NULL DEFAULT '1'

DROP TABLE IF EXISTS `ps_country_tax`

ALTER TABLE `ps_order_detail` CHANGE `product_quantity_in_stock` `product_quantity_in_stock` INT(10) NOT NULL DEFAULT '0'

CREATE TABLE `ps_address_format` ( `id_country` int(10) unsigned NOT NULL, `format` varchar(255) NOT NULL DEFAULT '', KEY `country` (`id_country`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
(1050) Table 'ps_address_format' already exists

INSERT INTO `ps_address_format` (`id_country`, `format`) (SELECT `id_country` as id_country, 'firstname lastname\ncompany\nvat_number\naddress1\naddress2\npostcode city\ncountry\nphone' as format FROM ps_country)

UPDATE `ps_address_format` set `format`='firstname lastname company address1 address2 city State:name postcode country phone' where `id_country`=21

/* PHP:alter_cms_block(); */

/* PHP:add_module_to_hook(blockcategories, afterSaveAdminMeta); */

SET NAMES 'utf8'

ALTER TABLE `ps_tab_lang` MODIFY `id_lang` int(10) unsigned NOT NULL AFTER `id_tab`

ALTER TABLE `ps_carrier` ADD `is_free` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `is_module`

UPDATE `ps_address_format` SET `format`=REPLACE(REPLACE(`format`, 'state_iso', 'State:name'), 'country', 'Country:name')

ALTER TABLE `ps_orders` ADD INDEX `date_add`(`date_add`)

/* PHP:update_module_followup(); */

INSERT IGNORE INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_STOCK_MVT_REASON_DEFAULT', 3, NOW(), NOW())

/* PHP:add_order_state(PS_OS_WS_PAYMENT, en:Payment remotely accepted|fr:Paiement à distance accepté, 0, 0, lightblue, 1, 0, 0); */

/* PHP:alter_blocklink(); */

/* PHP:update_module_loyalty(); */

/* PHP:remove_module_from_hook(blockcategories, afterCreateHtaccess); */

/* PHP:updatetabicon_from_11version(); */

SET NAMES 'utf8'

DELETE FROM `ps_configuration_lang` WHERE 1 AND `value` is NULL AND `date_upd` is NULL

SET NAMES 'utf8'

UPDATE `ps_country` SET `display_tax_label` = '1' WHERE `id_country` = 21

/* PHP:check_webservice_account_table(); */

/* PHP:add_module_to_hook(blockcms, leftColumn); */

/* PHP:add_module_to_hook(blockcms, rightColumn); */

/* PHP:add_module_to_hook(blockcms, footer); */

UPDATE `ps_cart` ca SET `secure_key` = IFNULL((SELECT `secure_key` from `ps_customer` `cu` WHERE `cu`.`id_customer` = `ca`.`id_customer`), -1) WHERE `ca`.`secure_key` = -1

SET NAMES 'utf8'

UPDATE `ps_address_format` SET `format`=REPLACE(`format`, 'state', 'State:name')

SET @defaultOOS = (SELECT value FROM `ps_configuration` WHERE name = 'PS_ORDER_OUT_OF_STOCK')

/* Set 0 for every non-attribute product */ UPDATE `ps_product` p SET `cache_default_attribute` = 0 WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps_product_attribute`)

/* First default attribute in stock */ UPDATE `ps_product` p SET `cache_default_attribute` = (SELECT `id_product_attribute` FROM `ps_product_attribute` WHERE `id_product` = p.`id_product` AND default_on = 1 AND quantity > 0 LIMIT 1) WHERE `cache_default_attribute` IS NULL

/* Then default attribute without stock if we don't care */ UPDATE `ps_product` p SET `cache_default_attribute` = (SELECT `id_product_attribute` FROM `ps_product_attribute` WHERE `id_product` = p.`id_product` AND default_on = 1 LIMIT 1) WHERE `cache_default_attribute` IS NULL AND `out_of_stock` = 1 OR `out_of_stock` = IF(@defaultOOS = 1, 2, 1)

/* Next, the default attribute can be any attribute with stock */ UPDATE `ps_product` p SET `cache_default_attribute` = (SELECT `id_product_attribute` FROM `ps_product_attribute` WHERE `id_product` = p.`id_product` AND quantity > 0 LIMIT 1) WHERE `cache_default_attribute` IS NULL

/* If there is still no default attribute, then we go back to the default one */ UPDATE `ps_product` p SET `cache_default_attribute` = (SELECT `id_product_attribute` FROM `ps_product_attribute` WHERE `id_product` = p.`id_product` AND default_on = 1 LIMIT 1) WHERE `cache_default_attribute` IS NULL

UPDATE `ps_order_state_lang` SET `name` = 'Zahlung eingegangen' WHERE `ps_order_state_lang`.`id_order_state` =2 AND `ps_order_state_lang`.`id_lang` = (SELECT id_lang FROM `ps_lang` WHERE `iso_code` = 'de')

UPDATE `ps_order_state_lang` SET `name` = 'Bestellung eingegangen' WHERE `ps_order_state_lang`.`id_order_state` =3 AND `ps_order_state_lang`.`id_lang` = (SELECT id_lang FROM `ps_lang` WHERE `iso_code` = 'de')

UPDATE `ps_order_state_lang` SET `name` = 'Versendet' WHERE `ps_order_state_lang`.`id_order_state` =4 AND `ps_order_state_lang`.`id_lang` = (SELECT id_lang FROM `ps_lang` WHERE `iso_code` = 'de')

UPDATE `ps_order_state_lang` SET `name` = 'Erfolgreich abgeschlossen' WHERE `ps_order_state_lang`.`id_order_state` =5 AND `ps_order_state_lang`.`id_lang` = (SELECT id_lang FROM `ps_lang` WHERE `iso_code` = 'de')

UPDATE `ps_order_state_lang` SET `name` = 'Storniert' WHERE `ps_order_state_lang`.`id_order_state` =6 AND `ps_order_state_lang`.`id_lang` = (SELECT id_lang FROM `ps_lang` WHERE `iso_code` = 'de')

UPDATE `ps_order_state_lang` SET `name` = 'Fehler bei der Bezahlung' WHERE `ps_order_state_lang`.`id_order_state` =8 AND `ps_order_state_lang`.`id_lang` = (SELECT id_lang FROM `ps_lang` WHERE `iso_code` = 'de')

UPDATE `ps_order_state_lang` SET `name` = 'Artikel erwartet' WHERE `ps_order_state_lang`.`id_order_state` =9 AND `ps_order_state_lang`.`id_lang` = (SELECT id_lang FROM `ps_lang` WHERE `iso_code` = 'de')

UPDATE `ps_order_state_lang` SET `name` = 'Warten auf Zahlungseingang' WHERE `ps_order_state_lang`.`id_order_state` =10 AND `ps_order_state_lang`.`id_lang` = (SELECT id_lang FROM `ps_lang` WHERE `iso_code` = 'de')

UPDATE `ps_order_state_lang` SET `name` = 'Warten auf Zahlungseingang von PayPal' WHERE `ps_order_state_lang`.`id_order_state` =11 AND `ps_order_state_lang`.`id_lang` = (SELECT id_lang FROM `ps_lang` WHERE `iso_code` = 'de')

UPDATE `ps_order_state_lang` SET `name` = 'PayPal Anmeldung erfolgreich' WHERE `ps_order_state_lang`.`id_order_state` =12 AND `ps_order_state_lang`.`id_lang` = (SELECT id_lang FROM `ps_lang` WHERE `iso_code` = 'de')

UPDATE `ps_meta_lang` SET `url_rewrite` = 'identita' WHERE `url_rewrite` = 'Identità '

/* PHP:add_missing_rewrite_value(); */

SET NAMES 'utf8'

INSERT IGNORE INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_BACKUP_DROP_TABLE', 1, NOW(), NOW())

UPDATE `ps_tab_lang` SET `name` = 'SEO & URLs' WHERE `id_tab` = (SELECT `id_tab` FROM `ps_tab` WHERE `class_name` = 'AdminMeta' LIMIT 1) AND `id_lang` IN (SELECT `id_lang` FROM `ps_lang` WHERE `iso_code` IN ('en','fr','es','de','it'))

/* These 3 lines (remove_duplicate, drop index, add unique) MUST stay together in this order */ /* PHP:remove_duplicate_category_groups(); */

ALTER TABLE `ps_category_group` DROP INDEX `category_group_index`

ALTER TABLE `ps_category_group` ADD UNIQUE `category_group_index` (`id_category`,`id_group`)

SET NAMES 'utf8'

/* Fix wrong category level_depth caused by bug in 1.4.0.13 upgrade script */ /* PHP:regenerate_level_depth(); */

SET NAMES 'utf8'

UPDATE `ps_address_format` SET `format`='firstname lastname company address1 address2 city State:name postcode Country:name' WHERE `id_country` = (SELECT `id_country` FROM `ps_country` WHERE `iso_code`='GB')

UPDATE `ps_country` SET `contains_states` = 1 WHERE `id_country` = 145

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_LEGACY_IMAGES', '1', NOW(), NOW())

SET NAMES 'utf8'

ALTER TABLE `ps_image` MODIFY COLUMN `position` SMALLINT(2) UNSIGNED NOT NULL DEFAULT 0

INSERT IGNORE INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_OS_CHEQUE', '1', NOW(), NOW()), ('PS_OS_PAYMENT', '2', NOW(), NOW()), ('PS_OS_PREPARATION', '3', NOW(), NOW()), ('PS_OS_SHIPPING', '4', NOW(), NOW()), ('PS_OS_DELIVERED', '5', NOW(), NOW()), ('PS_OS_CANCELED', '6', NOW(), NOW()), ('PS_OS_REFUND', '7', NOW(), NOW()), ('PS_OS_ERROR', '8', NOW(), NOW()), ('PS_OS_OUTOFSTOCK', '9', NOW(), NOW()), ('PS_OS_BANKWIRE', '10', NOW(), NOW()), ('PS_OS_PAYPAL', '11', NOW(), NOW()), ('PS_OS_WS_PAYMENT', '12', NOW(), NOW()), ('PS_IMAGE_QUALITY', 'jpg', NOW(), NOW()), ('PS_PNG_QUALITY', '7', NOW(), NOW()), ('PS_JPEG_QUALITY', '90', NOW(), NOW()), ('PS_COOKIE_LIFETIME_FO', '480', NOW(), NOW()), ('PS_COOKIE_LIFETIME_BO', '480', NOW(), NOW())

ALTER TABLE `ps_lang` ADD `is_rtl` TINYINT(1) NOT NULL DEFAULT '0'

UPDATE `ps_country_lang` SET `name` = 'United State' WHERE `name` = 'USA' AND `id_lang` = ( SELECT `id_lang` FROM `ps_lang` WHERE `iso_code` = 'en' LIMIT 1 )

UPDATE `ps_hook` SET `live_edit` = 1 WHERE `name` = 'leftColumn' OR `name` = 'home' OR `name` = 'rightColumn' OR `name` = 'productfooter' OR `name` = 'payment'

ALTER TABLE `ps_stock_mvt_reason` MODIFY `sign` TINYINT(1) NOT NULL DEFAULT '1' AFTER `id_stock_mvt_reason`

UPDATE `ps_tab_lang` SET `name` = 'Geolocation' WHERE `name` = 'Geolocalization'

UPDATE `ps_tab_lang` SET `name` = 'Counties' WHERE `name` = 'County'

ALTER TABLE `ps_tax_rule` MODIFY `id_county` INT NOT NULL AFTER `id_country`

UPDATE `ps_address_format` set `format`='firstname lastname company address1 address2 city, State:name postcode Country:name phone' WHERE `id_country` = (SELECT `id_country` FROM `ps_country` WHERE `iso_code`='US')

ALTER TABLE `ps_attachment` CHANGE `mime` `mime` VARCHAR(128) NOT NULL

CREATE TABLE IF NOT EXISTS `ps_compare_product` ( `id_compare_product` int(10) unsigned NOT NULL AUTO_INCREMENT, `id_product` int(10) unsigned NOT NULL, `id_guest` int(10) unsigned NOT NULL, `id_customer` int(10) unsigned NOT NULL, `date_add` datetime NOT NULL, `date_upd` datetime NOT NULL, PRIMARY KEY (`id_compare_product`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8

DELETE FROM `ps_configuration` WHERE name = 'PS_LAYERED_NAVIGATION_CHECKBOXES' LIMIT 1

/* PHP:add_new_tab(AdminUpgrade, en:Upgrade|fr:Mise à jour, 9); */

/* PHP:alter_productcomments_guest_index(); */

SET NAMES 'utf8'

 

Hoe is dit mogelijk, en hoe voorkom ik deze?

voor zover ik zie heb ik nog geen fouten ontdekt, maar kunnen deze fouten kwaad?

 

Iemand enige info of hulp?

 

Thanks!

 

Patrick

Share this post


Link to post
Share on other sites

Firs better you use spoilers...

 

I don't speak you language but i like Amsterdam ) so...

 

Error:
ALTER TABLE `ps_country` CHANGE `need_identification_number` `need_identification_number` TINYINT(1) NOT NULL DEFAULT '0'
(1054) Unknown column 'need_identification_number' in 'ps_country'
 
Fix (put this in phpmyadmin sql):
ALTER TABLE  `ps_country` ADD  `need_identification_number` TINYINT( 1 ) NOT NULL DEFAULT  '0' AFTER  `contains_states` ;
 
Error:
ALTER TABLE `ps_image` DROP INDEX `product_position`, ADD UNIQUE `product_position` (`id_product`, `position`)
(1091) Can't DROP 'product_position'; check that column/key exists
Fix:
Do not worry because is no any index there

Hope it helps some one... but those errors is not critical.

Share this post


Link to post
Share on other sites

hi,

 

ik probeer ook nog steeds de 1-click upgrade van 1.5.3.1 naar de laatste.

hij geeft dan na "Backup files in progress. 2559 files left":

[Ajax / Server Error for action backupFiles] textStatus: "error " errorThrown:" " jqXHR: " "

 

kennelijk lukt het niet een backup te maken, ik gebruik maar 20% van mijn server ruimte

wat zou het kunnen zijn?

Share this post


Link to post
Share on other sites

Ik heb een update gedaan van 1.4.8 naar 1.6.0 en het was een hell of a job. Voorbereiding is het halve werk maar er kan altijd was misgaan. Ik heb eerst lokaal een webomgeving gemaakt met WAMP en de max_time_out en max_file_size flink opgeschroefd alsmede de memory limit. 

 

Een copie van de livesite gemaakt en die lokaal neergezet. Vervolgens met 1-click de update gedaan en dat ging helemaal goed (ook weer na wat vastlopers in de voorbereiding, maar al doende leert men. 

 

Wij hadden een template van Alsyum gekocht maar die bracht niet wat wij er van verwachten. Nu hebben we het standaard template gebruikt en daar zijn we nu tevreden mee. Waar moet je op letten:

 

Bij het maken van de backup van je site kun je alles beter default maken. Geen SSL, geen friendly url, standaard template.

 

Als je lokaal de DB hebt geinstalleerd moet je in ps_configuration het domain naar localhost zetten. In de ps_shop_url moet je de waarde wijzigen in localhost en aangeven waar je je shop hebt neergezet /testomgeving/ 

 

 

 

Suc6 Willem

 

www.lapalma-kralen.nl

Edited by Willem (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More