From de769efc0fe5a37bf2ec18e4b31d6dd7f05a3251 Mon Sep 17 00:00:00 2001 From: Pako Date: Mon, 7 Oct 2024 09:05:03 +0200 Subject: [PATCH] feat: refs #8075 autoupdating --- db/routines/vn/triggers/itemShelving_beforeUpdate.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db/routines/vn/triggers/itemShelving_beforeUpdate.sql b/db/routines/vn/triggers/itemShelving_beforeUpdate.sql index fabdf8efb..e22713a58 100644 --- a/db/routines/vn/triggers/itemShelving_beforeUpdate.sql +++ b/db/routines/vn/triggers/itemShelving_beforeUpdate.sql @@ -9,5 +9,8 @@ BEGIN SET NEW.userFk = account.myUser_getId(); END IF; + IF NEW.shelvingFk <> OLD.shelvingFk THEN + SET NEW.isMoving = FALSE; + END IF; END$$ DELIMITER ;