Definition
A version-controlled change to a database schema (adding tables, modifying columns, or creating indexes) that can be applied and rolled back consistently.
In Depth
Migration frameworks (Django's migrations, Alembic for SQLAlchemy) generate migration files from model changes, track which migrations have been applied, and execute them in order. This ensures all environments (dev, staging, prod) have identical database schemas.
Example Usage
Running 'python manage.py makemigrations' after adding the GlossaryTerm model, then 'migrate' to create the table in the database.
Business Context
Database migrations are essential for team development and deployment. They replace manual SQL scripts and keep schema changes reproducible and reversible.
Related Terms
ACID Properties
Atomicity, Consistency, Isolation, Durability: the four properties that guarantee database transacti...
Database Index
A data structure that speeds up query performance by creating a fast lookup path to rows based on sp...
Database Normalization
The process of organizing database tables to reduce data redundancy and improve data integrity by fo...
Database Sharding
Horizontally partitioning data across multiple database instances, distributing load and enabling st...
Django
A high-level Python web framework that provides an ORM, admin interface, authentication, and 'batter...
Also Known As
Tags
Quick Info
Need help implementing this in your business?
Get Started