What is Migration?
A version-controlled change to a database schema that can be applied and reversed systematically.
Database migrations track schema changes over time, similar to version control for code. Each migration defines an "up" (apply) and "down" (revert) operation, such as creating tables, adding columns, or modifying constraints.
Migrations ensure all environments (development, staging, production) have identical database schemas. They are run in sequence and tracked to prevent re-application. Tools include Flyway, Liquibase, Alembic, and framework-specific migration systems.