This commit is contained in:
parent
637c6a9035
commit
1a8df4d87c
|
@ -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 ;
|
|
@ -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 ;
|
|
@ -0,0 +1,4 @@
|
||||||
|
ALTER TABLE vn.clientUnpaid
|
||||||
|
ADD editorFk INT UNSIGNED NULL,
|
||||||
|
ADD CONSTRAINT ClientUnpaid_editorFk FOREIGN KEY (editorFk)
|
||||||
|
REFERENCES account.`user`(id);
|
|
@ -1,4 +1,4 @@
|
||||||
name: uppaid
|
name: unpaid
|
||||||
columns:
|
columns:
|
||||||
clientFk: client
|
clientFk: client
|
||||||
dated: date
|
dated: date
|
||||||
|
|
Loading…
Reference in New Issue