alembic-postgresql-enum icon indicating copy to clipboard operation
alembic-postgresql-enum copied to clipboard

Alembic's migration context non-default module prefixes are ignored when generating migrations

Open Jazzinghen opened this issue 8 months ago • 0 comments

When generating migrations using alembic-postgresql-enum the module prefixes set in Alembic's migration context are ignored.

For example, with this configuration:

context.configure(
    url=url,
    target_metadata=target_metadata,
    literal_binds=True,
    sqlalchemy_module_prefix="sqlalchemy.",
)

The generated lines should look like:

sqlalchemy.Enum("A", "B", "C", name="example").create(op.get_bind())

While instead the output is:

sa.Enum("A", "B", "C", name="example").create(op.get_bind())

Jazzinghen avatar Apr 24 '25 02:04 Jazzinghen