coding tips

Add unique index to MySQL database

As of version 5.7 MySQL no longer support the keyword IGNORE for ALTER TABLE command, as it was an extension which was badly defined (more information here). Therefore it’s now impossible to use the old query that allowed to delete duplicates by creating a new UNIQUE INDEX and altering the table.