About This Ticket

Ouch error!

by cactusjohnweb / December 1, 2014, 9:06 am

Hi I have an error when trying to manage my databases:


Unfortunately, this database can not be enabled in Databased right now. This is probably due not one or more tables missing a primary key or the primary key being set on a wrong column.


My databases have been working for a few years now, I don't want to go changing things, is there anything I can do with your software to make it work?






Hi J, 

Unfortunately, the script requires a proper primary key to be set on each table within a database for it to function properly. That's pretty much the only requirement as far as databases/tables go. Is there any particular reason why you're not adding primary keys to certain tables? Thanks!

I don't know as I said teh databases are really old, so, adding a primary key to my tables will that break my website?


It's hard to say without knowing the specifics of your situation. If your application was coded properly, addding a single primary key column won't affect anything. I would just give it a shot (do make sure you make a backup of the old database) as you would probably be fine.


I have taken a copy of my databasd and gone through all 200+ tables and checked they had a primary key.... they should all now have a primary key and still it's not working

Any suggestions?


Double check and make 100% sure all tables have indeed set a primary key. The system performs a simple check on each table and will report an error if it runs into a table without primary key.

is there a way to detect which tables do not have a primary key?

I have over 200 tables

does it have to be UNIQUE aswell?

Do my tables have to be UNIQUE too?


The values of the primary key column always have to be unique, however there's no need to set the column as a UNIQUE key. The best and standard way to do is is to add a primary key column and set this to "auto_increment". This way, the primary key column gets automatically incremented with each new record and you don't have to worry about the entire primary key issue anymore.

You're tables do not have to be unique. 

I hope the above helps! (apologies for the slow response; been on the road for a couple of days)


most of my table types are: MyISAM

some table types are: View

would this stop my my from being able to manage my database or is it just the Primary Keys?



this is still not working, can we please have a refund?




As far as I know, it's only the primary keys (haven't used the script with View tables, however the enable check only checks for primary keys, and since that's where it fails, that's where the issue is). Refunds can only be issued by Envato, so you would have contact Envato support for this I'm afraid.