Taming the Beast

Safely Managing Database Operations in Rails in a Team of 100s
Miles McGuire - Staff Engineer @ Intercom
Rails World 2025
Find the slides here

Migration checklist poster

Github action to automatically post a checklist on migration PRs

https://github.com/minuteman3/migration-checklist-poster

CustomCops/OnlyAtomicMigrations

Intercom’s own rubocop rule for handling un-bulked migrations

gist

CustomCops/AlwaysMakeIdColumnsBigints

Block columns ending in _id from being integer typed

gist

CustomCops/NoExecuteInMigrations

Prevent using the execute method in migrations

gist

Block unsafe operations

Override rake tasks in your environment to stop people taking unsafe actions in production

gist

Detect unsafe migrations

Analyse migrations at runtime and block them based on heuristics

gist