Jump to content

How to upgrade from 1.2.5 to 1.3.0.3 Beta 1?


Recommended Posts

phew - I am having some great issues. After the installer updated I get this:

Update is finished!

Unfortunately, 2 SQL errors have occurred.

SET NAMES 'utf8'

/* ##################################### */ /* STRUCTURE */ /* ##################################### */ ALTER TABLE `ps2_product` CHANGE `reduction_from` `reduction_from` DATE NOT NULL DEFAULT '1970-01-01', CHANGE `reduction_to` `reduction_to` DATE NOT NULL DEFAULT '1970-01-01'

ALTER TABLE `ps2_order_detail` CHANGE `tax_rate` `tax_rate` DECIMAL(10, 3) NOT NULL DEFAULT '0.000'

ALTER TABLE `ps2_group` ADD `price_display_method` TINYINT NOT NULL DEFAULT 0 AFTER `reduction`

CREATE TABLE `ps2_carrier_group` ( `id_carrier` int(10) unsigned NOT NULL, `id_group` int(10) unsigned NOT NULL, UNIQUE KEY `id_carrier` (`id_carrier`,`id_group`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8

ALTER TABLE `ps2_country` ADD `need_identification_number` TINYINT( 1 ) NOT NULL

ALTER TABLE `ps2_customer` ADD `dni` VARCHAR( 16 ) NULL AFTER `firstname`

ALTER TABLE `ps2_image` ADD INDEX `product_position` (`id_product`, `position`)

ALTER TABLE `ps2_hook_module` ADD INDEX `id_module` (`id_module`)

ALTER TABLE `ps2_customer` ADD INDEX `id_customer_passwd` (`id_customer`, `passwd`)

ALTER TABLE `ps2_tag` ADD INDEX `id_lang` (`id_lang`)

ALTER TABLE `ps2_customer_group` ADD INDEX `id_customer` (`id_customer`)

ALTER TABLE `ps2_category_group` ADD INDEX `id_category` (`id_category`)

ALTER TABLE `ps2_image` ADD INDEX `id_product_cover` (`id_product`, `cover`)

ALTER TABLE `ps2_employee` ADD INDEX `id_employee_passwd` (`id_employee`, `passwd`)

ALTER TABLE `ps2_product_attribute` ADD INDEX `product_default` (`id_product`, `default_on`)

ALTER TABLE `ps2_product_download` ADD INDEX `product_active` (`id_product`, `active`)

ALTER TABLE `ps2_tab` ADD INDEX `class_name` (`class_name`)

ALTER TABLE `ps2_module_currency` ADD INDEX `id_module` (`id_module`)

ALTER TABLE `ps2_product_attribute_combination` ADD INDEX `id_product_attribute` (`id_product_attribute`)

ALTER TABLE `ps2_orders` ADD INDEX `invoice_number` (`invoice_number`)

ALTER TABLE `ps2_product_tag` ADD INDEX `id_tag` (`id_tag`)

ALTER TABLE `ps2_cms_lang` CHANGE `id_cms` `id_cms` INT(10) UNSIGNED NOT NULL

ALTER TABLE `ps2_tax` CHANGE `rate` `rate` DECIMAL(10, 3) NOT NULL

ALTER TABLE `ps2_order_detail` ADD `discount_quantity_applied` TINYINT(1) NOT NULL DEFAULT 0 AFTER `ecotax`

ALTER TABLE `ps2_orders` ADD `total_products_wt` DECIMAL(10, 2) NOT NULL AFTER `total_products`

/* ##################################### */ /* CONTENTS */ /* ##################################### */ UPDATE `ps2_group` SET `price_display_method` = (SELECT `value` FROM `ps2_configuration` WHERE `name` = 'PS_PRICE_DISPLAY')

UPDATE `ps2_configuration` SET `value` = ROUND(value / (1 + ( SELECT rate FROM ( SELECT t.`rate`, COUNT(*) n FROM `ps2_orders` o LEFT JOIN `ps2_carrier` c ON (o.`id_carrier` = c.`id_carrier`) LEFT JOIN `ps2_tax` t ON (t.`id_tax` = c.`id_tax`) WHERE c.`deleted` = 0 AND c.`shipping_handling` = 1 GROUP BY o.`id_carrier` ORDER BY n DESC LIMIT 1 ) myrate ) / 100), 6) WHERE `name` = 'PS_SHIPPING_HANDLING'

DELETE FROM `ps2_configuration` WHERE `name` = 'PS_PRICE_DISPLAY'

DELETE FROM `ps2_product_attachment` WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps2_product`)

DELETE FROM `ps2_discount_quantity` WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps2_product`)

DELETE FROM `ps2_pack` WHERE `id_product_pack` NOT IN (SELECT `id_product` FROM `ps2_product`) OR `id_product_item` NOT IN (SELECT `id_product` FROM `ps2_product`)

DELETE FROM `ps2_product_sale` WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps2_product`)

DELETE FROM `ps2_scene_products` WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps2_product`)

DELETE FROM `ps2_search_index` WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps2_product`)

DELETE FROM `ps2_search_word` WHERE `id_word` NOT IN (SELECT `id_word` FROM `ps2_search_index`)

DELETE FROM `ps2_tag` WHERE `id_lang` NOT IN (SELECT `id_lang` FROM `ps2_lang`)

DELETE FROM `ps2_search_word` WHERE `id_lang` NOT IN (SELECT `id_lang` FROM `ps2_lang`)

INSERT INTO `ps2_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PRESTASTORE_LIVE', 1, NOW(), NOW()), ('PS_SHOW_ALL_MODULES', 0, NOW(), NOW()), ('PS_BACKUP_ALL', 0, NOW(), NOW()), ('PS_1_3_UPDATE_DATE', NOW(), NOW(), NOW()), ('PS_PRICE_ROUND_MODE', 2, NOW(), NOW())

(1062) Duplicate entry 'PRESTASTORE_LIVE' for key 'name'
INSERT INTO `ps2_hook` (`name`, `title`, `description`, `position`) VALUES ('createAccountTop', 'Block above the form for create an account', NULL , '1'), ('backOfficeHeader', 'Administration panel header', NULL , '0'), ('backOfficeTop', 'Administration panel top hover the tabs', NULL , '1'), ('backOfficeFooter', 'Administration panel footer', NULL , '1')

INSERT INTO `ps2_carrier_group` (id_carrier, id_group) (SELECT id_carrier, id_group FROM ps_carrier c, ps_group g WHERE c.active = 1)

(1146) Table 'websitedb_second.ps_carrier' doesn't exist
/* PHP */ /* PHP:convert_product_price(); */

SET NAMES 'utf8'

/* ##################################### */ /* STRUCTURE */ /* ##################################### */ ALTER TABLE `ps2_product_attachment` CHANGE `id_product` `id_product` INT(10) UNSIGNED NOT NULL, CHANGE `id_attachment` `id_attachment` INT(10) UNSIGNED NOT NULL

ALTER TABLE `ps2_attribute_impact` CHANGE `id_product` `id_product` INT(11) UNSIGNED NOT NULL, CHANGE `id_attribute` `id_attribute` INT(11) UNSIGNED NOT NULL

ALTER TABLE `ps2_block_cms` CHANGE `id_block` `id_block` INT(10) UNSIGNED NOT NULL, CHANGE `id_cms` `id_cms` INT(10) UNSIGNED NOT NULL

ALTER TABLE `ps2_customization` CHANGE `id_cart` `id_cart` int(10) unsigned NOT NULL, CHANGE `id_product_attribute` `id_product_attribute` int(10) unsigned NOT NULL default '0'

Link to comment
Share on other sites

Here's the first SQL error:

INSERT INTO `ps2_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES (‘PRESTASTORE_LIVE’, 1, NOW, NOW), (‘PS_SHOW_ALL_MODULES’, 0, NOW, NOW), (‘PS_BACKUP_ALL’, 0, NOW, NOW), (‘PS_1_3_UPDATE_DATE’, NOW, NOW, NOW), (‘PS_PRICE_ROUND_MODE’, 2, NOW, NOW)

(1062) Duplicate entry ‘PRESTASTORE_LIVE’ for key ‘name’

Have you previously tried to upgrade your store? It appears your database already had the PRESTASTORE_LIVE key in it, which is why this error occurred. This means the other keys in this query weren't installed, which is what is causing your error. You should execute the following query on your database to fix the problem:

INSERT INTO `ps2_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_SHOW_ALL_MODULES', 0, NOW, NOW), ('PS_BACKUP_ALL', 0, NOW, NOW), ('PS_1_3_UPDATE_DATE', NOW, NOW, NOW), ('PS_PRICE_ROUND_MODE', 2, NOW, NOW)



Here's the second SQL error:

INSERT INTO `ps2_carrier_group` (id_carrier, id_group) (SELECT id_carrier, id_group FROM ps_carrier c, ps_group g WHERE c.active = 1)

(1146) Table ‘websitedb_second.ps_carrier’ doesn’t exist

This is a bug in the upgrade script! It says ps_carrier instead of PREFIX_carrier. I'll report this as a bug. You should execute the following query on your database to fix the problem:

INSERT INTO `ps2_carrier_group` (id_carrier, id_group) (SELECT id_carrier, id_group FROM ps2_carrier c, ps2_group g WHERE c.active = 1)

Link to comment
Share on other sites

This bug has now been fixed on SVN. You should download the file at http://svn.prestashop.com/trunk/install-dev/sql/upgrade/1.3.0.1.sql and overwrite the file in your v1.3 beta 1 before installing to prevent the SQL error.


hi rocky!

I am also experiencing problems after upgrading from 1.2.0.4 to 1.3.0.3

1. Error Round mode
2. Quantity in Basket determined not true. That is, the buyer selects 1 item, but in the basket, he sees 87777

Here are pictures and a report on the updating of database

20203_my1b7YnDbgQRFPipwmxD_t

Link to comment
Share on other sites

  • 2 months later...

Try going to the Preferences tab andturning on "v1.1 theme compatibility mode". Are you sure that your database was successfully upgraded? If you are using PrestaShop v1.3 with a PrestaShop v1.2.5 database, you'll get round mode problems.

Link to comment
Share on other sites

Try going to the Preferences tab andturning on "v1.1 theme compatibility mode". Are you sure that your database was successfully upgraded? If you are using PrestaShop v1.3 with a PrestaShop v1.2.5 database, you'll get round mode problems.


Hi rocky,

I just upgraded from 1.2.5 to 1.3.1

I am now getting the round mode error. How can I check the database was upgraded successfully and how do I correct the error.

Appreciated

Dave.
Link to comment
Share on other sites

It is hard to check whether your database was updated correctly. The easiest way to tell is whether it says "Update successful" or it said "Update failed". Clicking "View SQL log" lets you see what SQL was executed and check for any error messages.

Link to comment
Share on other sites

Thanks rocky,

The update definitely said the update was successful so I guess the Dbase must be OK.

Don't know what this round mode error is all about then. Can't make any changes to that Preferences page as that error always comes up.

Anyone any suggestions?

Thanks.

Link to comment
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...