salix/db/versions/.archive/10585-pinkMedeola/01-entryLog.sql

8 lines
496 B
MySQL
Raw Permalink Normal View History

ALTER TABLE `vn`.`entryLog`
CHANGE COLUMN `changedModel` `changedModel` ENUM('Entry', 'Buy', 'EntryObservation') NOT NULL DEFAULT 'Entry' ,
MODIFY COLUMN changedModelId INT(11) NOT NULL,
MODIFY COLUMN oldInstance JSON NULL,
MODIFY COLUMN newInstance JSON NULL,
ADD INDEX IF NOT EXISTS `entryLog_changedModel` (`changedModel` ASC, `changedModelId` ASC, `creationDate` ASC),
ADD INDEX IF NOT EXISTS `entryLog_originFk` (`originFk` ASC, `creationDate` ASC),
DROP INDEX IF EXISTS `logEntry_ibfk_1` ;