salix/db/versions/.archive/10585-pinkMedeola/03-clientLog.sql

8 lines
605 B
MySQL
Raw Permalink Normal View History

ALTER TABLE `vn`.`clientLog`
CHANGE COLUMN `changedModel` `changedModel` ENUM('Client', 'Address', 'ClientContact', 'ClientDms', 'ClientObservation', 'ClientSample', 'Greuge', 'Recovery', 'TpvTransaction', 'WorkerDms', 'Sms') NOT NULL DEFAULT 'Client',
MODIFY COLUMN changedModelId INT(11) NOT NULL,
MODIFY COLUMN oldInstance JSON NULL,
MODIFY COLUMN newInstance JSON NULL,
ADD INDEX IF NOT EXISTS `clientLog_changedModel` (`changedModel` ASC, `changedModelId` ASC, `creationDate` ASC),
ADD INDEX IF NOT EXISTS `clientLog_clientLog` (`originFk` ASC, `creationDate` ASC),
DROP INDEX IF EXISTS `originFk` ;