From fa108e2af01637a7552d9364ca4838eac6302769 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 8 Nov 2024 11:56:17 +0100 Subject: [PATCH] fix: refs #7529 fix sql --- .../11245-turquoiseAnthurium/00-firstScript.sql | 15 --------------- db/versions/11312-navyAralia/00-firstScript.sql | 12 +++--------- 2 files changed, 3 insertions(+), 24 deletions(-) delete mode 100644 db/versions/11245-turquoiseAnthurium/00-firstScript.sql diff --git a/db/versions/11245-turquoiseAnthurium/00-firstScript.sql b/db/versions/11245-turquoiseAnthurium/00-firstScript.sql deleted file mode 100644 index f1c4d9471..000000000 --- a/db/versions/11245-turquoiseAnthurium/00-firstScript.sql +++ /dev/null @@ -1,15 +0,0 @@ --- ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_disabilityGradeFk; --- ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_workerFk; - --- RENAME TABLE `vn`.`workerRelatives` TO `vn`.`workerRelative`; - --- ALTER TABLE vn.workerRelative ADD CONSTRAINT `workerRelatives_disabilityGradeFk` FOREIGN KEY (`disabilityGradeFk`) REFERENCES `disabilityGrade` (`id`) ON UPDATE CASCADE; --- ALTER TABLE vn.workerRelative ADD CONSTRAINT `workerRelatives_workerFk` FOREIGN KEY (`workerFk`) REFERENCES `workerIrpf` (`workerFk`) ON DELETE CASCADE ON UPDATE CASCADE; - - --- INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) --- VALUES --- ('workerRelative','*','*','ALLOW','ROLE','hr'), --- ('workerIrpf','*','*','ALLOW','ROLE','hr'), --- ('disabilityGrade','*','*','ALLOW','ROLE','hr'); - diff --git a/db/versions/11312-navyAralia/00-firstScript.sql b/db/versions/11312-navyAralia/00-firstScript.sql index 0d58503bb..446c7d4fe 100644 --- a/db/versions/11312-navyAralia/00-firstScript.sql +++ b/db/versions/11312-navyAralia/00-firstScript.sql @@ -1,15 +1,9 @@ ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_disabilityGradeFk; ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_workerFk; --- RENAME TABLE `vn`.`workerRelatives` TO `vn`.`workerRelative`; - --- ALTER TABLE vn.workerRelative ADD CONSTRAINT `workerRelatives_disabilityGradeFk` FOREIGN KEY (`disabilityGradeFk`) REFERENCES `disabilityGrade` (`id`) ON UPDATE CASCADE; --- ALTER TABLE vn.workerRelative ADD CONSTRAINT `workerRelatives_workerFk` FOREIGN KEY (`workerFk`) REFERENCES `workerIrpf` (`workerFk`) ON DELETE CASCADE ON UPDATE CASCADE; - - INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) VALUES - ('workerRelatives','*','*','ALLOW','ROLE','hr'), - ('workerIrpf','*','*','ALLOW','ROLE','hr'), - ('disabilityGrade','*','*','ALLOW','ROLE','hr'); + ('WorkerRelative','*','*','ALLOW','ROLE','hr'), + ('WorkerIrpf','*','*','ALLOW','ROLE','hr'), + ('DisabilityGrade','*','*','ALLOW','ROLE','hr');