A CI check that failed the build when someone forgot a DB migration
The sharer told this exact project in their Brightloom interview and went on to receive a return offer.
Step into this interview
4 real follow-ups from the actual loop · 2 hard · ~12 min
You answer each question first — only then does the sharer's real take open up.
How they told it
People kept merging model changes without the matching migration and breaking staging. I added a CI step that caught it before merge.
Read the full telling
At a mid-size SaaS company, a recurring annoyance was that someone would change a database model in a pull request but forget to include the migration file, and staging would break after merge. It happened enough that it had a nickname. As an intern I asked if I could try to catch it in CI. My first idea was naive — just check that if any model file changed, a migration file also changed — but that had false positives, like renaming a comment or editing a docstring shouldn't require a migration. So I leaned on the ORM's own tooling: I added a CI step that ran the framework's 'check for missing migrations' command in a throwaway database and failed the build if it reported pending schema changes with no migration. That was authoritative because it asked the framework itself rather than guessing from file diffs. The hard part was making the failure message useful — a red X with no explanation just annoys people — so I had it print the exact command to generate the missing migration. I tested it by intentionally opening a PR with a model change and no migration to confirm it went red, and one with both to confirm it stayed green. It cut the 'forgot the migration' breakages to basically zero on our team.
What they actually got asked
Your first approach was diffing files. Why did you move off it, and what edge cases did it miss?
hardHow did you convince yourself the check was correct and wouldn't block people wrongly?
mediumWhat happened the first time it blocked a legitimate PR someone was frustrated about?
hardWas it still in the pipeline after your internship, and did other teams pick it up?
easy