Jump to content

Upgrading from 1.4.10 to 1.5.6: db issues


Recommended Posts

Hi,

 

I upgrade a 1.4.10 store to 1.5.6 using the 1 click module, this worked very smoothly, but....

The module mentioned that the upgrade was done successfully, but with some errors.

 

The list of errors are all database related and I don't know what impact they have.

For reference the list of errors, for me its rather an impressive one:

 

--------------------------

[ERROR] SQL 1.5.0.0 1054 in INSERT INTO `ps_shop` (`id_shop`, `id_group_shop`, `name`, `id_category`, `id_theme`, `active`, `deleted`) VALUES (1, 1, (SELECT value FROM `ps_configuration` WHERE name = 'PS_SHOP_NAME'), 1, 1, 1, 0): Unknown column 'id_group_shop' in 'field list'

 

[ERROR] SQL 1.5.0.0 1364 in INSERT INTO `ps_theme` (`id_theme`, `name`) VALUES (1, 'prestashop'): Field 'directory' doesn't have a default value

 

[ERROR] SQL 1.5.0.0 1054 in INSERT INTO `ps_stock` (id_product, id_product_attribute, id_shop, quantity) (SELECT id_product, id_product_attribute, 1, quantity FROM ps_product_attribute): Unknown column 'id_shop' in 'field list'

 

[ERROR] SQL 1.5.0.0 1054 in INSERT INTO `ps_stock` (id_product, id_product_attribute, id_shop, quantity) (SELECT id_product, 0, 1, IF( (SELECT COUNT(*) FROM ps_product_attribute pa WHERE p.id_product = pa.id_product) > 0, (SELECT SUM(pa2.quantity) FROM ps_product_attribute pa2 WHERE p.id_product = pa2.id_product), quantity ) FROM ps_product p): Unknown column 'id_shop' in 'field list'

 

[ERROR] SQL 1.5.0.0 1054 in UPDATE ps_stock_mvt sm SET sm.id_stock = IFNULL(( SELECT IFNULL(s.id_stock, 0) FROM ps_stock s WHERE s.id_product = sm.id_product AND s.id_product_attribute = sm.id_product_attribute ORDER BY s.id_shop ), 0): Unknown column 's.id_shop' in 'order clause'

 

[ERROR] SQL 1.5.0.0 1364 in INSERT INTO `ps_currency_shop` (id_shop, id_currency) (SELECT 1, id_currency FROM ps_currency): Field 'conversion_rate' doesn't have a default value

 

[ERROR] SQL 1.5.0.0 1364 in INSERT INTO `ps_image_shop` (id_shop, id_image) (SELECT 1, id_image FROM `ps_image`): Field 'cover' doesn't have a default value

 

[ERROR] SQL 1.5.0.0 1054 in INSERT INTO `ps_attribute_group_shop` (id_group_shop, id_attribute) (SELECT 1, id_attribute FROM `ps_attribute`): Unknown column 'id_group_shop' in 'field list'

 

[ERROR] SQL 1.5.0.0 1364 in INSERT INTO `ps_product_shop` (id_shop, id_product) (SELECT 1, id_product FROM `ps_product`): Field 'id_tax_rules_group' doesn't have a default value

 

[ERROR] SQL 1.5.0.1 1054 in ALTER TABLE `ps_cart_rule_lang` CHANGE `id_discount` `id_cart_rule` int(10) unsigned NOT NULL: Unknown column 'id_discount' in 'ps_cart_rule_lang'

 

[ERROR] SQL 1.5.0.1 1054 in ALTER TABLE `ps_cart_rule_lang` CHANGE `description` `name` varchar(254) NOT NULL: Unknown column 'description' in 'ps_cart_rule_lang'

 

[ERROR] SQL 1.5.0.1 1054 in ALTER TABLE `ps_cart_rule_product_rule_value` CHANGE `id_category` `id_item` int(10) unsigned NOT NULL: Unknown column 'id_category' in 'ps_cart_rule_product_rule_value'

 

[ERROR] SQL 1.5.0.1 1054 in ALTER TABLE `ps_cart_rule_product_rule_value` CHANGE `id_discount` `id_product_rule` int(10) unsigned NOT NULL: Unknown column 'id_discount' in 'ps_cart_rule_product_rule_value'

 

[ERROR] SQL 1.5.0.1 1054 in INSERT INTO `ps_cart_rule_product_rule` (`id_product_rule`, `id_cart_rule`, `quantity`, `type`) ( SELECT DISTINCT `id_product_rule`, `id_product_rule`, 1, 'categories' FROM `ps_cart_rule_product_rule_value` ): Unknown column 'id_cart_rule' in 'field list'

 

[ERROR] PHP 1.5.0.2 /* Update records before alter tables */ /* PHP:set_stock_available(); */ 1054 - (products)Unknown column 'id_group_shop' in 'field list'

 

[ERROR] SQL 1.5.0.2 1364 in INSERT INTO `ps_order_invoice` (`id_order`, `number`, `total_discount_tax_excl`, `total_discount_tax_incl`, `total_paid_tax_excl`, `total_paid_tax_incl`, `total_products`, `total_products_wt`, `total_shipping_tax_excl`, `total_shipping_tax_incl`, `total_wrapping_tax_excl`, `total_wrapping_tax_incl`, `note`, `date_add`) ( SELECT `id_order`, `invoice_number`, `total_discounts_tax_excl`, `total_discounts_tax_incl`, `total_paid_tax_excl`, `total_paid_tax_incl`, `total_products`, `total_products_wt`, `total_shipping_tax_excl`, `total_shipping_tax_incl`, `total_wrapping_tax_excl`, `total_wrapping_tax_incl`, '', `invoice_date` FROM `ps_orders` WHERE `invoice_number` != 0 ): Field 'shipping_tax_computation_method' doesn't have a default value

 

[ERROR] SQL 1.5.0.2 1054 in INSERT IGNORE INTO `ps_order_payment` (`id_order_invoice`, `id_order`, `id_currency`, `amount`, `payment_method`, `conversion_rate`, `date_add`) ( SELECT ( SELECT oi.`id_order_invoice` FROM `ps_order_invoice` oi WHERE oi.`id_order` = o.`id_order` ), o.`id_order`, o.`id_currency`, o.`total_paid_real`, o.`payment`, o.`conversion_rate`, o.`date_add` FROM `ps_orders` o LEFT JOIN `ps_order_payment` op ON (op.`id_order` = o.`id_order`) WHERE op.`id_order_payment` IS NULL ): Unknown column 'op.id_order' in 'on clause'

 

[ERROR] SQL 1.5.0.4 1054 in INSERT INTO `ps_cart_rule_product_rule_group` (`id_product_rule_group`, `id_cart_rule`, `quantity`) ( SELECT `id_cart_rule`, `id_cart_rule`, `quantity` FROM `ps_cart_rule_product_rule` ): Unknown column 'id_cart_rule' in 'field list'

 

[ERROR] SQL 1.5.0.4 1054 in ALTER TABLE `ps_cart_rule_product_rule` CHANGE `id_cart_rule` `id_product_rule_group` int(10) unsigned NOT NULL: Unknown column 'id_cart_rule' in 'ps_cart_rule_product_rule'

 

[ERROR] SQL 1.5.0.10 1054 in ALTER TABLE `ps_shop` CHANGE `id_group_shop` `id_shop_group` INT( 11 ) UNSIGNED NOT NULL: Unknown column 'id_group_shop' in 'ps_shop'

 

[ERROR] SQL 1.5.0.10 1054 in ALTER TABLE `ps_stock_available` CHANGE `id_group_shop` `id_shop_group` INT( 11 ) UNSIGNED NOT NULL: Unknown column 'id_group_shop' in 'ps_stock_available'

 

[ERROR] SQL 1.5.0.10 1054 in INSERT INTO `ps_attribute_shop` (`id_attribute`, `id_shop`) (SELECT a.id_attribute, c.id_shop FROM ps_attribute_group_shop a LEFT JOIN ps_shop_group b ON a.id_group_shop = b.id_shop_group INNER JOIN ps_shop c ON b.id_shop_group = c.id_shop_group): Unknown column 'a.id_attribute' in 'field list'

 

[ERROR] PHP 1.5.0.12 /* PHP:p15012_add_missing_columns(); */ 1 - UPDATE `ps_order_payment` SET `id_order_invoice` = 0 WHERE `id_order_invoice` LIKE "" OR `id_order_invoice` IS NULLUnknown column 'id_order_invoice' in 'where clause'

 

[ERROR] SQL 1.5.0.13 1054 in INSERT INTO `ps_order_invoice_payment` (SELECT id_order_invoice, id_order_payment, id_order FROM `ps_order_payment` WHERE id_order_invoice > 0): Unknown column 'id_order_invoice' in 'field list'

 

[ERROR] SQL 1.5.0.13 1054 in -- Step 2: Add the collumn id_order_reference ALTER TABLE `ps_order_payment` ADD COLUMN `order_reference` VARCHAR(10) AFTER `id_order`, ADD INDEX `order_reference`(`order_reference`): Unknown column 'id_order' in 'ps_order_payment'

 

Warning detected during upgrade.

 

-----------------------------

 

Anybody got feedback on this on how to get rid of these, maybe I should do a rollback?

 

Thx

Eric

Link to comment
Share on other sites

Some tables was not altered correctly. It is hard to say if the 1click module is buggy at this point or perhaps server timeout caused it.

 

Try to turn off your shop, install the old version locally (no timeouts in PHP and MySQL and a lot memory), do upgrade, upload to the server and turn on again. Good luck.

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...