fix: refs #7529 fix sql
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Carlos Satorres 2024-11-08 11:56:17 +01:00
parent c5afde3334
commit fa108e2af0
2 changed files with 3 additions and 24 deletions

View File

@ -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');

View File

@ -1,15 +1,9 @@
ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_disabilityGradeFk; ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_disabilityGradeFk;
ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_workerFk; 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) INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES VALUES
('workerRelatives','*','*','ALLOW','ROLE','hr'), ('WorkerRelative','*','*','ALLOW','ROLE','hr'),
('workerIrpf','*','*','ALLOW','ROLE','hr'), ('WorkerIrpf','*','*','ALLOW','ROLE','hr'),
('disabilityGrade','*','*','ALLOW','ROLE','hr'); ('DisabilityGrade','*','*','ALLOW','ROLE','hr');