salix/db/versions/.archive/10585-pinkMedeola/00-ticketLog.sql

10 lines
721 B
MySQL
Raw Normal View History

-- Place your SQL code here
ALTER TABLE `vn`.`ticketLog`
CHANGE COLUMN `changedModel` `changedModel` ENUM('Ticket', 'Sale', 'TicketWeekly', 'TicketTracking', 'TicketService', 'TicketRequest', 'TicketRefund', 'TicketPackaging', 'TicketObservation', 'TicketDms', 'Expedition', 'Sms') NOT NULL DEFAULT 'Ticket',
MODIFY COLUMN changedModelId INT(11) NOT NULL,
MODIFY COLUMN oldInstance JSON NULL,
MODIFY COLUMN newInstance JSON NULL,
ADD INDEX IF NOT EXISTS `ticketLog_changedModel` (`changedModel` ASC, `changedModelId` ASC, `creationDate` ASC),
ADD INDEX IF NOT EXISTS `ticketLog_originFk` (`originFk` ASC, `creationDate` ASC),
DROP INDEX IF EXISTS `ticketLog_creationDate_IDX` ,
DROP INDEX IF EXISTS `logTicketoriginFk` ;