Database Migration
Question
What is a database migration?
Hint
Migrations are version-controlled schema changes.
Explanation
A database migration is a controlled, versioned change to the database schema. Migrations include creating/modifying tables, adding columns, changing types, and creating indexes. Each migration has an up (apply) and down (rollback) direction. Migrations are tracked in a migrations table to know which have been applied. Tools: Flyway, Liquibase (Java), Alembic (Python), Prisma Migrate (Node.js). Migrations enable: 1) Reproducible environments. 2) Team collaboration on schema changes. 3) Safe rollbacks. 4) CI/CD integration. Always test migrations on a copy of production data.
Related Resources
Related Lessons
- Migrations
Learn migrations.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.