feat: refs #7216 triggers
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javi Gallego 2024-06-19 13:41:37 +02:00
parent 637c6a9035
commit 1a8df4d87c
4 changed files with 21 additions and 1 deletions

View File

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

View File

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

View File

@ -0,0 +1,4 @@
ALTER TABLE vn.clientUnpaid
ADD editorFk INT UNSIGNED NULL,
ADD CONSTRAINT ClientUnpaid_editorFk FOREIGN KEY (editorFk)
REFERENCES account.`user`(id);

View File

@ -1,4 +1,4 @@
name: uppaid name: unpaid
columns: columns:
clientFk: client clientFk: client
dated: date dated: date