10 lines
721 B
MySQL
10 lines
721 B
MySQL
|
-- 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` ;
|