github.com/pf-qiu/concourse/v6@v6.7.3-0.20201207032516-1f455d73275f/atc/db/migration/migrations/1537197729_change_addr_when_running_constraint.down.sql (about) 1 BEGIN; 2 DELETE FROM "workers" WHERE (((state = 'stalled'::worker_state) OR (state = 'landed'::worker_state)) AND ((addr IS NOT NULL) OR (baggageclaim_url IS NOT NULL))); 3 4 ALTER TABLE "workers" 5 DROP CONSTRAINT IF EXISTS "addr_when_running", 6 ADD CONSTRAINT "addr_when_running" CHECK ((((state <> 'stalled'::worker_state) AND (state <> 'landed'::worker_state) AND ((addr IS NOT NULL) OR (baggageclaim_url IS NOT NULL))) OR (((state = 'stalled'::worker_state) OR (state = 'landed'::worker_state)) AND (addr IS NULL) AND (baggageclaim_url IS NULL)))); 7 COMMIT;