alembic-postgresql-enum
Alembic autogenerate support for creation, alteration and deletion of enums
Decision gist · record as of 2026-08-14
Yes. If you use Alembic with PostgreSQL enums, this package eliminates a significant manual step in migration generation. It has no known vulnerabilities, low install friction, active maintenance, and permissive MIT licensing. The only limitation is that enum value renames require manual migration editing.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires an existing Alembic project with SQLAlchemy models using postgresql.ENUM columns; PostgreSQL database backend.
- Low friction install with only 2 runtime dependencies (alembic and sqlalchemy).
- Repository is active with recent commits and no known vulnerabilities.
License · maintenance · safety
MIT (permissive) — MIT license is permissive and places no restrictions on use, modification, or distribution in commercial or private projects.
last release 2026-02-23 (172 days) · last repo commit 2026-02-23 · 345 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,882,201 downloads/mo, #2,845 on PyPI
Alternatives
Verify before relying
pip install alembic-postgresql-enum
# In migrations/env.py, add at the top:
import alembic_postgresql_enum
# Then run:
alembic revision --autogenerate- Whether enum value renaming truly requires manual migration editing or if there are workarounds
- Performance characteristics with large numbers of enums or enum values
- Compatibility with PostgreSQL versions older than the current release cycle
What it is and what it does
This package hooks into Alembic's autogenerate process to detect when enums are created, modified, or removed from your SQLAlchemy models, then generates migration code to keep your PostgreSQL schema in sync. When you import the package in your migrations/env.py file, it registers custom comparators that watch for enum changes. If you add a new enum column to a model, Alembic will generate migration code that creates the enum type in PostgreSQL before creating the column. If you remove an enum column, the migration will drop the unused enum. If enum values change, the migration generates sync operations to update the type definition.
The package automates enum creation, removal, addition and deletion of enum values, reordering of enum values, and deletion of unused enums from schema. Enum value renaming requires manual migration editing.
Use it for
- Automatically generate migrations when adding a new PostgreSQL enum column to an existing table
- Track and apply enum value additions or deletions across your codebase without manual SQL
- Clean up unused enum types from PostgreSQL when they are removed from your models
- Maintain consistency between SQLAlchemy enum definitions and the PostgreSQL schema during team development
- Avoid manual enum creation and deletion SQL in migration files by letting autogenerate handle it
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
If you use Alembic with PostgreSQL enums, this package eliminates a significant manual step in migration generation. It has no known vulnerabilities, low install friction, active maintenance, and permissive MIT licensing. The only limitation is that enum value renames require manual migration editing.
Install
alembic-postgresql-enum on PyPI
Before you install
Low friction install with only 2 runtime dependencies (alembic and sqlalchemy). Repository is active with recent commits and no known vulnerabilities. Supports Python 3.7 through 3.14.
Requires an existing Alembic project with SQLAlchemy models using postgresql.ENUM columns; PostgreSQL database backend.
License in practice
MIT license is permissive and places no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
pip install alembic-postgresql-enum
# In migrations/env.py, add at the top:
import alembic_postgresql_enum
# Then run:
alembic revision --autogenerate
Verify before relying
- Whether enum value renaming truly requires manual migration editing or if there are workarounds
- Performance characteristics with large numbers of enums or enum values
- Compatibility with PostgreSQL versions older than the current release cycle
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.7.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesalembicsqlalchemy |
| Maintenance | Actively maintained 172 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,882,201 / month, #2,845 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: alembic_postgresql_enum-1.10.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “auto-generate enum migrations”
- alembic-postgresql-enumExtends Alembic to automatically detect and manage PostgreSQL enum…
- alembic-autogenerate-enumsExtends Alembic's autogenerate to detect and emit PostgreSQL enum…
- alembicAlembic generates and manages database schema migrations for…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also alembic-autogenerate-enums · pytest-alembic · alembic_utils · alembic · migra · django-pg-zero-downtime-migrations · Flask-Alembic · Flask-Migrate · django-postgres-extra · omnibase-compat