2024-05-09 10:35:26 +00:00
|
|
|
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
|
2024-05-15 11:15:27 +00:00
|
|
|
WHERE firstEditorFk NOT IN (SELECT id FROM account.user);
|
2024-05-09 10:35:26 +00:00
|
|
|
|
|
|
|
ALTER TABLE vn.route
|
2024-05-15 11:15:27 +00:00
|
|
|
ADD CONSTRAINT route_firstEditorFk FOREIGN KEY (firstEditorFk) REFERENCES account.user(id);
|