salix/db/versions/.archive/10585-pinkMedeola/04-invoiceInLog.sql

8 lines
497 B
MySQL
Raw Normal View History

ALTER TABLE `vn`.`invoiceInLog`
CHANGE COLUMN `changedModel` `changedModel` ENUM('InvoiceIn', 'invoiceInTax') NOT NULL DEFAULT 'InvoiceIn',
MODIFY COLUMN changedModelId INT(11) NOT NULL,
MODIFY COLUMN oldInstance JSON NULL,
MODIFY COLUMN newInstance JSON NULL,
ADD INDEX IF NOT EXISTS `invoiceInLog_changedModel` (`changedModel` ASC, `changedModelId` ASC, `creationDate` ASC),
ADD INDEX IF NOT EXISTS `invoiceInLog_originFk` (`originFk` ASC, `creationDate` ASC),
DROP INDEX IF EXISTS `originFk` ;