What problem does it solve? Managing schema changes across multiple database dialects is error-prone: SQLite cannot run most ALTER statements, Alembic autogenerate silently misreads renames as drop-and-add (destroying data), and teams lack a versioned, reversible migration history. This Skill wires Alembic to an existing SQLAlchemy 2.x Base.metadata and enforces the practices that keep one migration history correct on SQLite, PostgreSQL, and MySQL. ## Core Features & Use Cases - Environment wiring: Connects env.py and alembic.ini to your models' Base.metadata, sources the DB URL from the environment, and enables render_as_batch plus a naming_convention so constraints survive SQLite table recreation. - Safe revision workflow: Covers revision, autogenerate, mandatory review of generated scripts (renames, server_defaults, CHECK constraints are known blind spots), and true-inverse downgrade functions. - Multi-dialect batch migrations: Writes alter operations in batch_alter_table (move-and-copy) style so the same script emits plain ALTER on PostgreSQL/MySQL and table recreation on SQLite. - Branching and adoption: Resolves multiple heads with alembic merge and adopts Alembic on an existing create_all-built database via alembic stamp baseline. - Use Case: You shipped an app using Base.metadata.create_all() and now need to add a column that must deploy to PostgreSQL in production and SQLite in tests. This Skill stamps a baseline on the existing database, autogenerates the change, rewrites it in batch style, and applies it with a reversible upgrade/downgrade pair. ## Quick Start Use the alembic skill to wire Alembic to my SQLAlchemy models and write a reviewed batch-style migration that adds a priority column to the jobs table on both SQLite and PostgreSQL.