View Single Post
  #10  
Old 05-31-2020, 11:17 PM
 
aim aim is offline
Advanced Staff Users
 

X-Cart team
  
Join Date: Dec 2008
Posts: 927
 

Default Re: X-Cart 4.7.12 released

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.
__________________
Sincerely yours,
Ildar Amankulov
Head of Maintenance group
Reply With Quote