Skip to content

Commit

Permalink
Merge pull request #32 from Denhai/enumsortorder
Browse files Browse the repository at this point in the history
Order defined enums by enumsortorder
  • Loading branch information
RustyGuard authored Oct 8, 2023
2 parents fa7626e + 23c652a commit 1edd194
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion alembic_postgresql_enum/get_enum_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def get_defined_enums(conn, schema: str) -> EnumNamesToValues:
pg_catalog.format_type(t.oid, NULL),
ARRAY(SELECT enumlabel
FROM pg_catalog.pg_enum
WHERE enumtypid = t.oid)
WHERE enumtypid = t.oid
ORDER BY enumsortorder)
FROM pg_catalog.pg_type t
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace
WHERE
Expand Down

0 comments on commit 1edd194

Please sign in to comment.