Something went wrong with my shop and was inaccessible.
looking at my backups, i noticed that some time in July, the size of the database had increased,
the June SQL export was about 8MB, the September one was 66MB. the maximum import for sql files was 50MB
I couldn't see any reason for this and the only option I could see was to delete all the shop files and database to start again from the June backup.
That all went well:
I then noticed in a couple of days I had 5 thousands entries in the system error log .
Looking in Advanced/Maintenace/Database.. were many errors like:
"CubeCart_category.cat_parent_id has no key set. Expecting KEY."
"CubeCart_admin_users.admin_id has a key type KEY but expecting PRIMARY."
a previous post on the forum pointed me to use the PHP admin to Amend, delete and add indexes and unique settings.
Also some tables had duplicate entries in the primary fields, for example the currency table. - i was able to delete duplicates in CC admin.
Uncleared Errors on the database report are:
Errors referring to a field that does not appear in the table structer
CubeCart_documents.doc_privacy has no key set. Expecting KEY.
CubeCart_inventory.live_from has no key set. Expecting KEY.
CubeCart_sessions.acp has no key set. Expecting KEY.
I'm unable to set this as a unique field, all records seem to be empty
CubeCart_order_summary.custom_oid has no key set. Expecting UNIQUE KEY.
I've cleared most of the problems, and the shop seems to work, but in the last 15 minutes there are 273 items in the error log:
File: [catalogue.class.php] Line:  "SELECT SQL_CALC_FOUND_ROWS MIN(`live_from`) AS `next_time` FROM `CubeCart_inventory` WHERE `live_from` > UNIX_TIMESTAMP() LIMIT 1;" - Unknown column 'live_from' in 'field list'
This seems to refer to the 2nd uncleared issue above.
Does anyone know what might be going on and how to clear these database errors.