{"id":26710,"library":"alembic-git-revisions","title":"alembic-git-revisions","description":"Alembic extension that automatically chains migration revisions based on git commit history, replacing manual dependency specification. Current version 6, requires Python >=3.11. Release cadence is irregular.","status":"active","version":"6","language":"python","source_language":"en","source_url":"https://github.com/olirice/alembic-git-revisions","tags":["alembic","git","migrations","revision","automatic","chaining"],"install":[{"cmd":"pip install alembic-git-revisions","lang":"bash","label":"pip"}],"dependencies":[],"imports":[{"note":"Incorrect submodule path; symbol is directly in package.","wrong":"from alembic_git_revisions.plugin import GitRevisionPlugin","symbol":"GitRevisionPlugin","correct":"from alembic_git_revisions import GitRevisionPlugin"},{"note":"GitAlembicCommand replaces standard Alembic command when using git revisions.","wrong":"alembic.command","symbol":"GitAlembicCommand","correct":"from alembic_git_revisions import GitAlembicCommand"}],"quickstart":{"code":"from alembic.config import Config\nfrom alembic_git_revisions import GitRevisionPlugin\nimport os\n\nconfig = Config()\nconfig.set_main_option('script_location', 'migrations')\ngit_plugin = GitRevisionPlugin()\ngit_plugin.setup(config)\nprint('Alembic git revisions plugin initialized.')","lang":"python","description":"Initialize the plugin with an Alembic Config object."},"warnings":[{"fix":"Always use the provided `GitAlembicCommand` subclass or invoke via the plugin's command wrapper.","message":"Using standard `alembic revision --autogenerate` without GitAlembicCommand may cause broken revision chains.","severity":"deprecated","affected_versions":"all"},{"fix":"Commit or stash changes before running migration commands.","message":"The plugin requires a clean git working tree (no uncommitted changes) to generate revision dependencies.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to Python 3.11+.","message":"Version 6 drops support for Python <3.11. Older Python versions will fail to install.","severity":"breaking","affected_versions":">=6"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install alembic-git-revisions` and use `from alembic_git_revisions import GitRevisionPlugin`.","cause":"Incorrect import path; package renamed or not installed.","error":"ImportError: cannot import name 'GitRevisionPlugin'"},{"fix":"Ensure you are on a branch with the expected commit history. Run `git log` to verify.","cause":"Missing git history or head revision not in sync with branches.","error":"alembic.util.exc.CommandError: Can't locate revision identified by 'abc123'"},{"fix":"Create an alembic.config.Config instance and pass it: `plugin.setup(config)`.","cause":"Calling setup without passing Alembic Config object.","error":"TypeError: setup() missing 1 required positional argument: 'config'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}