Alembic Overview Alembic is the migration tool for SQLAlchemy. It tracks database schema changes as versioned Python scripts — like Git for your database. Supports autogeneration from model changes, branching, and data migrations. Instructions Step 1: Setup Step 2: Create Migrations Step 3: Data Migrations Step 4: Commands Guidelines - Always review autogenerated migrations — they may miss renames (detected as drop+create). - Run migrations in CI before deploying — catch schema issues early. - Data migrations should be idempotent — safe to run multiple times. - Use for SQLite (which doesn't s…