Skip to content

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

Open
@Jazzinghen

Description

@Jazzinghen

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())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions