View Single Post
  #14  
Old 10-27-2020, 02:57 AM
 
herber@wirehub.nl herber@wirehub.nl is offline
 

eXpert
  
Join Date: Nov 2002
Posts: 305
 

Default Re: X-Cart 4.7.12 released

Quote:
Originally Posted by aim
Hello,

You are right, I have added the query intentionally.

You can safely ignore the error in the log files.

To remove duplicates do the following steps:
0) Make a DB backup. (Especially the xcart_modules table)


1) Find the duplicates
Code:
select module_name,moduleid,active,author,tags from xcart_modules order by module_name, moduleid;


2) Remove the duplicates that have the highest moduleid by using the query
Code:
DELETE FROM xcart_modules WHERE moduleid IN (id1,id2,id3);

3) After that add the UNIQUE INDEX
Code:
ALTER TABLE xcart_modules ADD UNIQUE KEY `module_name` (`module_name`);
to prevent future problems.

Thank you.
Sorry, it has been a while since I've had time to continue the 4.7.12 upgrade.
I'm getting the following error when running the ALTER TABLE query:
Code:
Error in query (1061): Duplicate key name 'module_name'

module_name is already an INDEX, should that be changed to UNIQUE?
__________________
X-Cart 4.7.12
Reply With Quote