refs #6965 Add Fk vehicleFk firstEditorFk
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
feb36eb911
commit
9d7184ed7b
|
@ -0,0 +1,13 @@
|
||||||
|
UPDATE vn.route
|
||||||
|
SET vehicleFk = NULL
|
||||||
|
WHERE vehicleFk NOT IN (SELECT id FROM vn.vehicle);
|
||||||
|
|
||||||
|
ALTER TABLE vn.route
|
||||||
|
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);
|
||||||
|
|
||||||
|
ALTER TABLE vn.route
|
||||||
|
ADD CONSTRAINT route_firstEditorFk FOREIGN KEY (firstEditorFk) REFERENCES vn.worker(id);
|
Loading…
Reference in New Issue