SpinTheMic
Pro

Interview practice question

A migration locked the table

Backend Engineering · Relational Databases · Beginner

Running a migration that added a column with a default value locked a big table and caused downtime. What would you do differently?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Some ALTERs rewrite/lock tables.
  • Check DB version behaviour.
  • Add nullable column, backfill in batches.
  • Then add default/constraint.
  • Online schema change tools; test on copy.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics