Productera
Glossary

Definition

Database Migration

A version-controlled change to your database schema — adding tables, modifying columns, or transforming data — applied consistently across all environments.

Database migrations are scripts that incrementally modify a database's structure, tracked in version control alongside application code. Tools like Prisma Migrate, Flyway, Alembic, and Knex manage the migration lifecycle — creating, applying, and rolling back schema changes in order. Without migrations, database changes are made ad-hoc through console commands, leading to environments that drift out of sync and deployments that fail because the database doesn't match the code. AI-generated projects often skip migration tooling entirely, leaving founders manually running SQL statements and hoping they remember what changed.

Related Terms

Questions about your tech stack?

We'll give you an honest assessment of where your product stands — no sales pitch.