From fd6b6883829df074166ea7a8d8e7f92bfdec41da Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 17 Jun 2022 09:40:33 +0200 Subject: [PATCH] fix(changes): prevent sql errors when test to master --- db/changes/10470-family/00-aclMdb.sql | 8 ++++---- .../{10480-june => 10470-family}/00-creditInsurance.sql | 0 .../01-creditInsuranceTriggers.sql | 0 3 files changed, 4 insertions(+), 4 deletions(-) rename db/changes/{10480-june => 10470-family}/00-creditInsurance.sql (100%) rename db/changes/{10480-june => 10470-family}/01-creditInsuranceTriggers.sql (100%) diff --git a/db/changes/10470-family/00-aclMdb.sql b/db/changes/10470-family/00-aclMdb.sql index c57f60eb3..b02ddc451 100644 --- a/db/changes/10470-family/00-aclMdb.sql +++ b/db/changes/10470-family/00-aclMdb.sql @@ -1,14 +1,14 @@ -CREATE TABLE `vn`.`mdbBranch` ( +CREATE TABLE IF NOT EXISTS `vn`.`mdbBranch` ( `name` VARCHAR(255), PRIMARY KEY(`name`) ); -CREATE TABLE `vn`.`mdbVersion` ( +CREATE TABLE IF NOT EXISTS `vn`.`mdbVersion` ( `app` VARCHAR(255) NOT NULL, `branchFk` VARCHAR(255) NOT NULL, `version` INT, CONSTRAINT `mdbVersion_branchFk` FOREIGN KEY (`branchFk`) REFERENCES `vn`.`mdbBranch` (`name`) ON DELETE CASCADE ON UPDATE CASCADE ); -INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) - VALUES('MdbVersion', '*', '*', 'ALLOW', 'ROLE', 'developer'); +INSERT IGNORE INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) + VALUES(318, 'MdbVersion', '*', '*', 'ALLOW', 'ROLE', 'developer'); diff --git a/db/changes/10480-june/00-creditInsurance.sql b/db/changes/10470-family/00-creditInsurance.sql similarity index 100% rename from db/changes/10480-june/00-creditInsurance.sql rename to db/changes/10470-family/00-creditInsurance.sql diff --git a/db/changes/10480-june/01-creditInsuranceTriggers.sql b/db/changes/10470-family/01-creditInsuranceTriggers.sql similarity index 100% rename from db/changes/10480-june/01-creditInsuranceTriggers.sql rename to db/changes/10470-family/01-creditInsuranceTriggers.sql -- 2.40.1