This commit is contained in:
parent
0a726a8fe7
commit
903d85a243
|
@ -1,15 +1,15 @@
|
|||
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_disabilityGradeFk;
|
||||
-- ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_workerFk;
|
||||
|
||||
RENAME TABLE `vn`.`workerRelatives` TO `vn`.`workerRelative`;
|
||||
-- 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;
|
||||
-- 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
|
||||
('Worker','workerRelative','*','ALLOW','ROLE','hr'),
|
||||
('Worker','workerIrpf','*','ALLOW','ROLE','hr'),
|
||||
('Worker','disabilityGrade','*','ALLOW','ROLE','hr');
|
||||
-- INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||
-- VALUES
|
||||
-- ('workerRelative','*','*','ALLOW','ROLE','hr'),
|
||||
-- ('workerIrpf','*','*','ALLOW','ROLE','hr'),
|
||||
-- ('disabilityGrade','*','*','ALLOW','ROLE','hr');
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
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');
|
||||
|
Loading…
Reference in New Issue