You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues and didn't find my bug already reported there
I have checked that my bug is still present in the latest release
Sqlacodegen version
3.0.0rc5
SQLAlchemy version
2.0.37
RDBMS vendor
PostgreSQL
What happened?
SQLACodegen causes the first element of the enum to be the enum name, but as far as I know this would be taken literally as an enum value (name goes at the end with the kwarg name, which is also being done). Here are the docs for the PostgresSQL ENUM type.
I'm willing to submit a fix if this is a bug.
Database schema for reproducing the bug
Input:
CREATESCHEMAdefinitions;
createtypedefinitions.colors as ENUM
(
'RED',
'GREEN',
'BLUE'
);
CREATETABLEdefinitions.state (
id UUID PRIMARY KEY,
location TEXT,
color definitions.colors DEFAULT 'RED'::definitions.colors
);
Things to check first
I have searched the existing issues and didn't find my bug already reported there
I have checked that my bug is still present in the latest release
Sqlacodegen version
3.0.0rc5
SQLAlchemy version
2.0.37
RDBMS vendor
PostgreSQL
What happened?
SQLACodegen causes the first element of the enum to be the enum name, but as far as I know this would be taken literally as an enum value (name goes at the end with the kwarg
name
, which is also being done). Here are the docs for the PostgresSQL ENUM type.I'm willing to submit a fix if this is a bug.
Database schema for reproducing the bug
Input:
Output:
The text was updated successfully, but these errors were encountered: