Catch unsafe migrations in development
open sourceMITself-hostablefree
Strong Migrations stops Rails migrations that could lock tables or break a running app during a deploy, and explains the safe way to do the same thing. It checks for removing, renaming or changing the type of columns, renaming tables, adding indexes, foreign keys, check constraints or unique constraints without the non-blocking forms, backfilling in the same migration, and more, with checks specific to Postgres, MySQL and MariaDB. You mark a migration you've made safe with safety_assured. It also sets a long statement timeout for migrations, so the app can keep a short one.
Problems it solves
- a migration locked a big table and took our site down during a deploy
- removing a column broke the running app before the deploy finished
- warn developers when a migration will add an index without CONCURRENTLY
- catch dangerous Postgres migrations in code review automatically
- how do I rename a column in Rails without downtime
- changing a column type rewrote the whole table in production
- teach the team zero-downtime migration patterns
- keep a short statement timeout for the app but a long one for migrations
Features
- checks for removing, renaming and retyping columns
- index, foreign key, check and unique constraint checks
- backfill checks
- Postgres-specific checks
- MySQL and MariaDB support
- safe alternatives in every message
- safety_assured blocks
- migration statement timeouts
- custom checks
Capabilities
| Takes plugins | plan not known |
|---|
