salix/db/versions/10812-goldenPaniculata/00-update.sql

9 lines
215 B
MySQL
Raw Normal View History

2024-01-25 16:33:54 +00:00
UPDATE IGNORE vn.dms
SET dmsTypeFk = (SELECT id FROM vn.dmsType WHERE code = 'vehicle')
WHERE id IN (
SELECT d.id
FROM vn.dms d
JOIN vn.dmsType dt ON dt.id = d.dmsTypeFk
WHERE dt.code = 'vehicles'
);