phantomeye Posted July 15, 2013 Share Posted July 15, 2013 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 More sharing options...
bellini13 Posted July 15, 2013 Share Posted July 15, 2013 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 Open phpmyadmin, select your database, and then select the table 'ps_category_product' Go to the Structure tab for this table. Scroll down to the indexes section and locate an entry for "Primary" 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 More sharing options...
phantomeye Posted July 15, 2013 Author Share Posted July 15, 2013 (edited) Hi Bellini13, Thanks for your answer, this is what i found, let me know what you think. Cheers ! Edited July 15, 2013 by phantomeye (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted July 15, 2013 Share Posted July 15, 2013 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 More sharing options...
phantomeye Posted July 15, 2013 Author Share Posted July 15, 2013 Just updated the table and here is what it looks like now. Did this table manage all the default category and category information ? Link to comment Share on other sites More sharing options...
bellini13 Posted July 15, 2013 Share Posted July 15, 2013 this table simply manages what products exist in which categories, and in which order they would appear by default. the products default category is stored within the product table. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now