From 9ed90412ded9c7cf8b0368fcf710209265d08e03 Mon Sep 17 00:00:00 2001 From: ivanm Date: Wed, 15 May 2024 13:15:27 +0200 Subject: [PATCH] refs #6965 Points to user instead of worker --- db/versions/11040-grayMonstera/00-firstScript.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/versions/11040-grayMonstera/00-firstScript.sql b/db/versions/11040-grayMonstera/00-firstScript.sql index 0f20e771b..8fb0e85c3 100644 --- a/db/versions/11040-grayMonstera/00-firstScript.sql +++ b/db/versions/11040-grayMonstera/00-firstScript.sql @@ -7,7 +7,7 @@ ADD CONSTRAINT route_vehicleFk FOREIGN KEY (vehicleFk) REFERENCES vn.vehicle(id) UPDATE vn.route SET firstEditorFk = NULL - WHERE firstEditorFk NOT IN (SELECT id FROM vn.worker); + WHERE firstEditorFk NOT IN (SELECT id FROM account.user); ALTER TABLE vn.route -ADD CONSTRAINT route_firstEditorFk FOREIGN KEY (firstEditorFk) REFERENCES vn.worker(id); +ADD CONSTRAINT route_firstEditorFk FOREIGN KEY (firstEditorFk) REFERENCES account.user(id);