The expected answer probably implies some db knowledge, potentially… — andreyka26_se — TG.ME

andreyka26_seI have seen this q in Threads: Tech interview questions | Database The orders table has ~50 million rows. You need to add a new column is_gift with a default value of false. A developer ran the migration, and after 10 seconds the entire service stopped…
The expected answer probably implies some db knowledge, potentially avoiding index creation, and potentially going with NULL first.

BUT

The actual way of doing it if you respect customers, your engineers and oncall - is typical 3 step migration:

Bring new storage with new field. Hydrate it with existing data

1. Write to both, read from first storage
2. Write to both, read from second storage
3. Write and read from second storage (that has flag)


Worked on 1M rps. Applies regardless of storage type.
❤5
15 октября 2026 г. 414