salix/db/versions/10895-pinkArborvitae/02-thirdScript.sql

18 lines
1.3 KiB
SQL

ALTER TABLE `vn`.`productionConfig` ADD IF NOT EXISTS backupPrinterNotificationDelay int unsigned NULL
COMMENT 'Minimum seconds Interval to Prevent Spam from Same-Type Notifications';
ALTER TABLE vn.sector DROP FOREIGN KEY IF EXISTS sector_FK;
ALTER TABLE `vn`.`sector` CHANGE IF EXISTS `mainPrinterFk` `backupPrinterFk` int unsigned DEFAULT NULL NULL;
ALTER TABLE `util`.`notificationSubscription` DROP FOREIGN KEY IF EXISTS `notificationSubscription_ibfk_1`;
ALTER TABLE `util`.`notificationQueue` DROP FOREIGN KEY IF EXISTS `nnotificationQueue_ibfk_1`;
ALTER TABLE `util`.`notificationAcl` DROP FOREIGN KEY IF EXISTS `notificationAcl_ibfk_1`;
ALTER TABLE `util`.`notification` MODIFY COLUMN IF EXISTS `id` int(11) auto_increment NOT NULL;
ALTER TABLE `util`.`notificationSubscription` ADD CONSTRAINT `notificationSubscription_Fk` FOREIGN KEY IF NOT EXISTS (`notificationFk`) REFERENCES `util`.`notification`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `util`.`notificationQueue` ADD CONSTRAINT `notificationQueue_Fk` FOREIGN KEY IF NOT EXISTS (`notificationFk`) REFERENCES `util`.`notification`(`name`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `util`.`notificationAcl` ADD CONSTRAINT `notificationAcl_Fk` FOREIGN KEY IF NOT EXISTS (`notificationFk`) REFERENCES `util`.`notification`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;