Open
Description
Currently, creating an Enum type with the dialect ala:
sa.Column(
"an_enum",
sa.Enum("A", "B", "C"),
),
creates a string column with no server-side checks on enum values. This appears to be because the supports_native_enum
field on the dialect is currently set to True, which indicates to SQLAlchemy that it doesn't need to generate the CHECK
constraints to actually enforce the enum values server-side. I think this should be set to False so we generate those CHECK
constraints.
Spanner's ENUM looks to depend on protos which seems harder to implement. I think just generating those CHECK
constraints would be a helpful improvement!