Home / Concepts

What is an additive migration?

A database change that adds a table, column, index or permission without removing anything existing code still needs.

Because it only adds, an additive migration can be applied before the code that uses it. Old code keeps working. New code finds what it expects.

That ordering matters when code deploys automatically after a merge. If the code arrives before the database is ready, it fails in production.

A migration that has already been applied is never edited. A defect is fixed by adding a new migration. Otherwise two environments can disagree about what the same migration did.

Lessons that use it

Try “secrets”, “merge”, “handover” or “database”.