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.
Related terms
More in Databases and storage
Keeping data correct