feat: refs #6395 Added buyerFk in buy
This commit is contained in:
parent
3ee63e489e
commit
c8b156771d
|
@ -19,6 +19,7 @@ trig: BEGIN
|
|||
END IF;
|
||||
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
SET NEW.buyerFk = NEW.editorFk;
|
||||
|
||||
CALL buy_checkGrouping(NEW.`grouping`);
|
||||
|
||||
|
|
|
@ -65,6 +65,10 @@ trig:BEGIN
|
|||
SET NEW.isIgnored = TRUE;
|
||||
END IF;
|
||||
|
||||
IF NOT (NEW.itemFk <=> OLD.itemFk) THEN
|
||||
SET NEW.buyerFk = NEW.editorFk;
|
||||
END IF;
|
||||
|
||||
IF NOT (NEW.itemFk <=> OLD.itemFk) OR
|
||||
NOT (OLD.entryFk <=> NEW.entryFk) THEN
|
||||
CREATE OR REPLACE TEMPORARY TABLE tmp.buysToCheck
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE vn.buy ADD buyerFk int(10) unsigned DEFAULT NULL NULL;
|
Loading…
Reference in New Issue