Skip to content

Postgres enum labels uppercase but Python StrEnum values lowercase — raw SQL footgun #79

Description

@antosubash

Fixed in #87simple_module_db.migrations.render_item now emits sa.Enum(..., values_callable=lambda e: [m.value for m in e]) for StrEnum columns, so Postgres labels match the lowercase StrEnum values rather than uppercase attribute names. See framework/db/simple_module_db/migrations.py:133.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions