warning
hosted, paid — --remote
DROP COLUMN destroying data inside the deploy window
Warning — this works, but blocks traffic or rewrites data at scale.
What it catches
Dropping a column destroys its data irreversibly, and any app instance deployed before the migration still selects or writes the column until the rollout completes — those queries fail immediately. The safe order is: stop reading it in code, deploy, then drop one release later.
Fires on
ALTER TABLE users DROP COLUMN legacy_flags;Do this instead
Contract in two releases: release N stops every read and write of the column in app code and fully deploys; release N+1 drops the column. The drop itself is then metadata-only and instant — guard it with lock_timeout and it is safe.
-- Release N: remove every app reference to the column, deploy fully.
-- Release N+1 (metadata-only, instant once nothing reads it):
SET lock_timeout = '5s';
-- ALTER TABLE users DROP COLUMN legacy_flags;Catch 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