Databases and storage · Concept

Migrations

Numbered scripts that change a database's structure step by step, so every copy of the database (yours, a teammate's, production) ends up the same.

Keeping data correct · updated

How it works

Instead of editing tables by hand, each change (add a column, create an index, rename a table) goes into a migration file that is committed with the code. A tool records which migrations a database has already run and applies only the new ones, in order.

Prisma Migrate, drizzle-kit, the Supabase CLI, Django, Laravel, Flyway and Liquibase all work this way. A migration that rewrites a big table can lock it, so large changes are usually split into several safe steps.

More in Databases and storage

Keeping data correct

All 25 Databases and storage terms

Crafted in the dark. Shipped to the world.

Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.