Merge branch 'dev' into 7584-workerTimeControl_afterDelete
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
94ccdabe89
|
@ -0,0 +1,9 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerManaExcluded_beforeInsert`
|
||||
BEFORE INSERT ON `workerManaExcluded`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
DELETE FROM workerMana
|
||||
WHERE workerFk = NEW.workerFk;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -0,0 +1,9 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerManaExcluded_beforeUpdate`
|
||||
BEFORE UPDATE ON `workerManaExcluded`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
DELETE FROM workerMana
|
||||
WHERE workerFk = NEW.workerFk;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -0,0 +1,10 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerMana_beforeInsert`
|
||||
BEFORE INSERT ON `workerMana`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
IF (SELECT EXISTS(SELECT TRUE FROM workerManaExcluded WHERE workerFk = NEW.workerFk)) THEN
|
||||
CALL util.throw('Worker is excluded from mana');
|
||||
END IF;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -0,0 +1,10 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerMana_beforeUpdate`
|
||||
BEFORE UPDATE ON `workerMana`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
IF (SELECT EXISTS(SELECT TRUE FROM workerManaExcluded WHERE workerFk = NEW.workerFk)) THEN
|
||||
CALL util.throw('Worker is excluded from mana');
|
||||
END IF;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -0,0 +1,5 @@
|
|||
DELETE FROM vn.workerMana
|
||||
WHERE workerFk IN (
|
||||
SELECT workerFk
|
||||
FROM vn.workerManaExcluded
|
||||
);
|
Loading…
Reference in New Issue