Alembic cheatsheets. Pair with the textbook .
Alembic Cheatsheet 01 — Setup and env.py
Cheatsheet: alembic init, env.py wiring for SQLAlchemy 2.0, async env.py, naming conventions.
Alembic cheatsheets. Pair with the textbook .
Cheatsheet: alembic init, env.py wiring for SQLAlchemy 2.0, async env.py, naming conventions.
Cheatsheet: complete list of alembic CLI commands with flags and common scenarios.
Cheatsheet: autogenerate detection rules, common misses (renames, data, defaults), drift detection.
Cheatsheet: op.create_table / drop / add_column / alter_column / indexes / constraints / FKs / raw SQL.
Cheatsheet: expand-contract pattern, CONCURRENTLY index, FK validation in two phases, batched backfill.
Cheatsheet: when branches form, alembic merge, single-head CI gate, recovery.
Cheatsheet: multidb template, schema-per-tenant env.py, parallel migrations.
Cheatsheet: GitHub Actions, drift test, up-down round-trip, dry-run SQL, deploy gates.
Cheatsheet: K8s Job vs app-startup, advisory-lock single runner, forward-only, recovery via stamp.
Cheatsheet: copy-paste migrations for common changes — add NOT NULL column, rename, FK, ENUM, JSONB, view, trigger.