Jump to content

Upgrade 1.3.1 to 1.4.11 shows 1 sql error


Recommended Posts

Hi Guys,

I just manually upgraded from 1.3.1 to 1.4.11 and after going through the install, it showed me "Unfortunately there was 1 SQL error"

 

Ive attached the log, please let me know if you can see what the error is and how to fix this. The site is working fine, but im not sure why the above error was shown.

 

Thanks

Upgrade SQL log.txt

Link to comment
Share on other sites

This was the reported error

(1091) Can't DROP 'category_product_index'; check that column/key exists

 

This was the command that failed

ALTER TABLE `ps_category_product` DROP INDEX `category_product_index`, ADD PRIMARY KEY (`id_category`, `id_product`)

 

The command is trying to remove an existing index (which may have not existed), and then tried to add a new one. If the index did not exist (which is perfectly fine), then of course the command would fail. This error would be safe to ignore

 

Now, the second part of that command was creating a new primary key on the table 'ps_category_product'. You should confirm that the key was created successfully. Using phpmyadmin, I would check the table 'ps_category_product', and ensure the key exists

  1. Open phpmyadmin, select your database, and then select the table 'ps_category_product'
  2. Go to the Structure tab for this table.
  3. Scroll down to the indexes section and locate an entry for "Primary"
  4. If the entry exists, you should see `id_category` and `id_product` in the same column for that entry

Link to comment
Share on other sites

Oh, the entire command failed. Ok, glad we checked. Using phpmyadmin, execute this command which will add the missing primary key. Just click on the SQL tab for the ps_category_product table. Then paste the below command and click go.

ALTER TABLE `ps_category_product` ADD PRIMARY KEY (`id_category`, `id_product`)

Then confirm the primary key exists using the commands in the above post.

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