A database migration is an explicit, versioned change that transitions a database schema or its data from one state to another. Store migrations with regular code in source control so the schema has a single, traceable source of truth. section 10.1 section 10.7
A migration-based workflow establishes practical rules:
- Apply every schema modification, including reference data, through migrations. section 10.7
- Prefer explicit migrations over a model database or state-based delivery when data motion matters more than resolving schema merge conflicts. section 10.1 section 10.7
- Keep database changes out of unmanaged database instances so development and production changes remain traceable. section 10.1
Creating and reversing a table
A numbered migration defines both directions of a schema change: its Up operation creates the Users table, while its Down operation deletes it.


















