Jump to content

Database error at 1-Click upgrade - Error upgrading Doctrine schema


Recommended Posts

Hi there.

Im facing an issue when upgrading from 1.7.0.4 to newest version with the 1 click upgrade. Can anyone tell from the error below whats happening with this guest table in the database, and how i can fix it`? :)

Error during database upgrade. You may need to restore your database.
Error upgrading Doctrine schema

 

[WARNING] SQL 1.7.6.2 1054 in INSERT INTO `clk_9367875130_info_lang` SELECT `entity`.`id_info`, 1, `entity`.`id_lang`, `entity`.`text` FROM `clk_9367875130_info_lang` entity LEFT JOIN `clk_9367875130_info_lang` entity2 ON `entity2`.`id_shop` = 1 AND `entity`.`id_info` = `entity2`.`id_info` WHERE `entity2`.`id_shop` IS NULL: Unknown column 'entity2.id_shop' in 'where clause'

[OK] SQL 1.7.6.2 INSERT INTO `clk_9367875130_meta_lang` SELECT `entity`.`id_meta`, 1, `entity`.`id_lang`, `entity`.title, `entity`.`description`, `entity`.`keywords`, `entity`.`url_rewrite` FROM `clk_9367875130_meta_lang` entity LEFT JOIN `clk_9367875130_meta_lang` entity2 ON `entity2`.`id_shop` = 1 AND `entity`.`id_meta` = `entity2`.`id_meta` WHERE `entity2`.`id_shop` IS NULL

[OK] SQL 1.7.6.2 INSERT INTO `clk_9367875130_product_lang` SELECT `entity`.`id_product`, 1, `entity`.`id_lang`, `entity`.`description`, `entity`.`description_short`, `entity`.`link_rewrite`, `entity`.`meta_description`, `entity`.`meta_keywords`, `entity`.`meta_title`, `entity`.`name`, `entity`.`available_now`, `entity`.`available_later`, `entity`.`delivery_in_stock`, `entity`.`delivery_out_stock` FROM `clk_9367875130_product_lang` entity LEFT JOIN `clk_9367875130_product_lang` entity2 ON `entity2`.`id_shop` = 1 AND `entity`.`id_product` = `entity2`.`id_product` WHERE `entity2`.`id_shop` IS NULL

Updating database schema...13:47:37 ERROR [console] Error thrown while running command "prestashop:schema:update-without-foreign". Message: "The table with name 'ndosupply_dk_db.clk_9367875130_guest' already exists." ["exception" => Doctrine\DBAL\Schema\SchemaException { …},"command" => "prestashop:schema:update-without-foreign","message" => "The table with name 'ndosupply_dk_db.clk_9367875130_guest' already exists."]In SchemaException.php line 109:The table with name 'ndosupply_dk_db.clk_9367875130_guest' already exists.prestashop:schema:update-without-foreign [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--id_shop [ID_SHOP]] [--id_shop_group [ID_SHOP_GROUP]] [--]

Link to comment
Share on other sites

I solved this, pretty wierd way though, but it seems to work. it was this simple:

Rename the table mentioned in the error to clk_9367875130_guest_OLD (anything els than the original name will do ofc)

Ran the 1 click upgrade with success.

After this i had a 500 server error when accessing the Costumer tab in backend (didnt really bother to enable debugging to check further, as i suspected the renamed table for it)
I then renamed the table back to its original name, and voila! Pretty weird fix, but its seems to work

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