salix/db/versions/10926-limeFern/00-refactorClaimState.sql

9 lines
291 B
MySQL
Raw Permalink Normal View History

2024-03-14 07:36:19 +00:00
UPDATE vn.claim c
JOIN vn.claimState cs ON cs.id = c.claimStateFk
JOIN vn.claimState ns ON ns.code = 'resolved'
SET c.claimStateFk = ns.id
WHERE cs.code IN ('managed', 'mana', 'lack', 'relocation');
DELETE FROM vn.claimState
WHERE code IN ('managed', 'mana', 'lack', 'relocation');