ALTER TABLE `vn`.`itemLog` CHANGE COLUMN `changedModel` `changedModel` ENUM('Item', 'ItemBarcode', 'ItemBotanical', 'ItemNiche', 'ItemTag', 'ItemTaxCountry') NOT NULL DEFAULT 'Item', MODIFY COLUMN changedModelId INT(11) NOT NULL, MODIFY COLUMN oldInstance JSON NULL, MODIFY COLUMN newInstance JSON NULL, DROP INDEX IF EXISTS `itemLog_changedModel_idx` , ADD INDEX IF NOT EXISTS `itemLog_changedModel_idx` (`changedModel` ASC, `changedModelId` ASC, `creationDate` ASC), ADD INDEX IF NOT EXISTS `itemLog_originFk` (`originFk` ASC, `creationDate` ASC), DROP INDEX IF EXISTS `itemLogItemFk_idx` ;