ALEMBIC(1)

✨ ALEMBIC(1) β€” User Commands ✨

πŸ’– NAME

alembic β€” manual page for alembic 1.19.2 πŸ¦‹

🌸 SYNOPSIS

okay so here's the vibe for calling it πŸ’…

usage: -c [-h] [--version] [-c CONFIG] [-n NAME] [-x X] [--raiseerr]
[-q]

        {branches,check,current,downgrade,edit,ensure_version,heads,history,init,list_templates,merge,revision,show,stamp,upgrade}
        ...

πŸŽ€ DESCRIPTION

bestie, this is the usage line, and it's giving "pick a subcommand and go" 🧚 Here's the full menu of subcommands you can pick from πŸ‘‘

{branches,check,current,downgrade,edit,ensure_version,heads,history,init,list_templates,merge,revision,show,stamp,upgrade}

πŸ“ positional arguments

{branches,check,current,downgrade,edit,ensure_version,heads,history,init,list_templates,merge,revision,show,stamp,upgrade}

🌈 branches

Show current branch points. It's literally where the revisions split up, so you can see the forks in the road ✨

πŸ’œ check

Check if revision command with autogenerate has pending upgrade ops. Basically it checks whether your revision --autogenerate has upgrade stuff hanging around that still needs doing πŸ™ˆ

🌷 current

Display the current revision for a database. Tells you where your database is at right now 🫢

πŸ‘ downgrade

Revert to a previous version. Rewinding the clock on your schema πŸ•°οΈ

πŸ¦‹ edit

Edit revision script(s) using $EDITOR. It opens your revision scripts in whatever editor you've got set up πŸ’…

πŸŒ™ ensure_version

Create the alembic version table if it doesn't exist already . Makes the version table if it isn't there yet, and does nothing if it already is πŸ’–

🌿 heads

Show current available heads in the script directory. The latest revision tips in your scripts folder 🌟

πŸ“œ history

List changeset scripts in chronological order. Your whole migration timeline, oldest to newest 🎞️

πŸͺ„ init

Initialize a new scripts directory. Sets up a brand new scripts folder from scratch ✨

🧁 list_templates

List available templates. Shows you what starter templates you can work with 🎨

πŸ’ž merge

Merge two revisions together. Creates a new migration file. Two branches come together and a new migration file is born 🫢

🌺 revision

Create a new revision file. Makes a fresh migration file for you πŸ’«

🎈 show

Show the revision(s) denoted by the given symbol. Pulls up the revision (or revisions) you point at πŸ‘€

🍭 stamp

'stamp' the revision table with the given revision; don't run any migrations. Marks the revision table as being at the revision you give it, but ngl it does NOT actually run any migrations πŸ™…β€β™€οΈ

πŸš€ upgrade

Upgrade to a later version. Moving your schema forward πŸ”₯

πŸŽ€ options

🌸 -h, --help

show this help message and exit πŸ™‹β€β™€οΈ

πŸ’… --version

show program's version number and exit 🌈

πŸ¦‹ -c, --config CONFIG

Alternate config file. Defaults to the value of the ALEMBIC_CONFIG environment variable, or "alembic.ini". It can also point at a pyproject.toml file. You can specify it twice to reference both files separately 🧚

πŸ“ -n, --name NAME

Name of section in .ini file to use for Alembic config (only applies to configparser config, not toml) 🌷

πŸ’œ -x X

Additional arguments consumed by custom env.py scripts, e.g. -x setting1=somesetting -x setting2=somesetting πŸŽ€

πŸŒ™ --raiseerr

Raise a full stack trace on error. If something breaks, you get the whole dramatic stack trace πŸ’€

⭐ -q, --quiet

Do not log to std output. Keeps the terminal quiet, no logs printed to stdout 🀫


⚠️ Heads up bestie: the --raiseerr flag gives you a full stack trace on error, so it's the one to reach for when you need the nitty-gritty details πŸ”

Sign-off: That's the tea for alembic 1.19.2 from the September 2026 docs πŸ’– Stay iconic, bestie ✨🫢

πŸ“¦ where this page comes from