For some reason, the
cscart_storage_data table primary key was dropped. Now we have ended up with a table with 2051735 total rows.
I tried to manually add in the primary key and it said duplicate. This was the SQL to show what duplicates existed:
SELECT data_key, COUNT(data_key) AS count
GROUP BY data_key
HAVING COUNT(data_key) > 1;
This returned the following result:
How do I clean this table up, so that I can apply the primary key again?
As a separate question, what is this table used for? Can I just delete every row from the table and start again from scratch? Would that impact our vendors, products and orders?