feat: refs #8535 log table mandate
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Carlos Andrés 2025-02-06 11:46:39 +01:00
parent 37b735b988
commit 9b2c0f1c48
1 changed files with 2 additions and 2 deletions

View File

@ -3,12 +3,12 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`mandate_beforeInsert`
BEFORE INSERT ON `mandate`
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
IF (NEW.code IS NULL) THEN
SET NEW.code=CONCAT(NEW.clientFk,'-',(SELECT AUTO_INCREMENT
FROM information_schema.TABLES
WHERE TABLE_SCHEMA='vn' and TABLE_NAME='mandate'));
END IF;
SET NEW.editorFk = account.myUser_getId();
END$$
DELIMITER ;