Skip to content

Commit

Permalink
Migrate config builder_url to builder_urls (#1662)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbearer authored Jul 1, 2024
2 parents 47700a5 + d11bb57 commit 22e7f4e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sequencer/api/migrations/V34__builder_urls.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- When multi-builder support was added, the configuration field `builder_url: Url` was replaced by
-- an array `builder_urls: Vec<Url>`. If the saved config has no `builder_urls` field, it is older
-- than this change. Populate `builder_urls` with a singleton array formed from the old value of
-- `builder_url`, and delete the no longer used `builder_url`.
UPDATE network_config
SET config =
jsonb_set(config, '{config,builder_urls}', jsonb_build_array(config->'config'->>'builder_url'))
#- '{config,builder_url}'
WHERE NOT (config->'config' ? 'builder_urls');

0 comments on commit 22e7f4e

Please sign in to comment.