Post by digitalinnova » Thu Jun 21, 2018 6:00 pm

Error Code(0): Error: Can't DROP 'PRIMARY'; check that column/key exists
Error No: 1091
ALTER TABLE `oc_category` DROP PRIMARY KEY, ADD PRIMARY KEY(`category_id`, `parent_id`) in /Applications/MAMP/htdocs/tt_presiden/system/library/db/mysqli.php on line 40

Newbie

Posts

Joined
Thu Jun 21, 2018 5:56 pm

Post by Johnathan » Fri Jun 22, 2018 3:37 am

The database query that's being run is not part of standard OpenCart installation that I'm aware of, so you must have an extension installed that is trying to change the primary key on the "category" table. However, the way the database query is being run isn't working, because as it says, it can't drop the primary key. You'll need to contact the author of whatever extension you are using, and ask them to fix the query. If you don't know which extension it is, I would start looking at anything category-related, search-related, or SEO-related.

If you're trying to run this query yourself, then you were informed wrong about the correct MySQL syntax for changing primary keys. I'm not entirely sure what you'd want to do that, so you may want to consult whatever directions you originally read about this, and ask whoever posted it about it.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 11 guests