salix/db/versions/.archive/10585-pinkMedeola/08-supplierLog.sql

9 lines
544 B
MySQL
Raw Normal View History

ALTER TABLE `vn`.`supplierLog`
CHANGE COLUMN `changedModel` `changedModel` ENUM('Supplier', 'SupplierAddress', 'SupplierAccount', 'SupplierContact') NOT NULL DEFAULT 'Supplier',
MODIFY COLUMN changedModelId INT(11) NOT NULL,
MODIFY COLUMN oldInstance JSON NULL,
MODIFY COLUMN newInstance JSON NULL,
ADD INDEX IF NOT EXISTS `supplierLog_changedModel` (`changedModel` ASC, `changedModelId` ASC, `creationDate` ASC),
ADD INDEX IF NOT EXISTS `supplierLog_originFk` (`originFk` ASC, `creationDate` ASC),
DROP INDEX IF EXISTS `logSupplier_ibfk_1` ;