note
hosted, paid — --remote
Enum value renamed inside the deploy window
Note — this works and blocks nothing, but a performance regression is likely.
What it catches
RENAME VALUE changes the label in place: every app instance still deployed with the old label gets an invalid-enum error on insert or comparison until the rollout completes — the enum flavor of the rename deploy-window break.
Fires on
ALTER TYPE order_status RENAME VALUE 'pending' TO 'awaiting';Do this instead
Treat enum labels like column names: add the new value in its own migration, deploy app code that reads both and writes the new one, convert existing rows in batches, and only retire the old label once nothing deployed uses it.
-- migration 1 (single statement, commits on its own):
ALTER TYPE order_status ADD VALUE IF NOT EXISTS 'awaiting';
-- deploy code reading both labels, batch-convert rows,
-- retire 'pending' only when no deployed code references itCatch this before it ships
This rule runs in the hosted service on Startup and above — add --remote with a team token, or use the GitHub Action: npx bolvrk check migration.sql