7336_devToTest #2414

Merged
alexm merged 220 commits from 7336_devToTest into test 2024-05-07 06:26:53 +00:00
5 changed files with 20 additions and 7 deletions
Showing only changes of commit d0dfdc668b - Show all commits

View File

@ -177,5 +177,8 @@
}, },
"ProductionConfig": { "ProductionConfig": {
"dataSource": "vn" "dataSource": "vn"
},
"AgencyLog": {
"dataSource": "vn"
} }
} }

View File

@ -3,7 +3,6 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`agency_afterInsert`
AFTER INSERT ON `agency` AFTER INSERT ON `agency`
FOR EACH ROW FOR EACH ROW
BEGIN BEGIN
SET NEW.editorFk = account.myUser_getId();
INSERT INTO agencyMode(name,agencyFk) VALUES(NEW.name,NEW.id); INSERT INTO agencyMode(name,agencyFk) VALUES(NEW.name,NEW.id);
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -0,0 +1,8 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`agency_beforeInsert`
BEFORE INSERT ON `agency`
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
END$$
DELIMITER ;

View File

@ -1,2 +1,5 @@
-- Place your SQL code here -- Place your SQL code here
INSERT INTO salix.ACL (id, model, property, accessType, permission, principalType, principalId) VALUES(826, 'Agency', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
VALUES('Agency', '*', 'READ', 'ALLOW', 'ROLE', 'employee');
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES ('AgencyLog','*','READ','ALLOW','ROLE','employee');

View File

@ -2,9 +2,9 @@
ALTER TABLE vn.agency ADD IF NOT EXISTS editorFk int(10) unsigned DEFAULT NULL NULL; ALTER TABLE vn.agency ADD IF NOT EXISTS editorFk int(10) unsigned DEFAULT NULL NULL;
CREATE TABLE IF NOT EXISTS `agencyLog` ( CREATE TABLE IF NOT EXISTS `vn`.`agencyLog` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`originFk` int(11) DEFAULT NULL, `originFk` smallint(5) unsigned DEFAULT NULL,
`userFk` int(10) unsigned DEFAULT NULL, `userFk` int(10) unsigned DEFAULT NULL,
`action` set('insert','update','delete','select') NOT NULL, `action` set('insert','update','delete','select') NOT NULL,
`creationDate` timestamp NULL DEFAULT current_timestamp(), `creationDate` timestamp NULL DEFAULT current_timestamp(),
@ -18,6 +18,6 @@ CREATE TABLE IF NOT EXISTS `agencyLog` (
KEY `logAgencyUserFk` (`userFk`), KEY `logAgencyUserFk` (`userFk`),
KEY `agencyLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`), KEY `agencyLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`),
KEY `agencyLog_originFk` (`originFk`,`creationDate`), KEY `agencyLog_originFk` (`originFk`,`creationDate`),
CONSTRAINT `agencyOriginFk` FOREIGN KEY (`agency`) REFERENCES `agency` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `agencyOriginFk` FOREIGN KEY (`originFk`) REFERENCES `agency` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `agencyUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE CONSTRAINT `agencyUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;