Skip to content

ENUM values are always lowercased regardless of actual case #1161

@abmyii

Description

@abmyii

lowercaseValue := strings.ToLower(value)

I'm not sure what the reasoning is behind this, bu it is causing issues with the SQLAlchemy ORM which sees the ENUM values as lowercase, causing it to raise errors like:

'UNSPECIFIED' is not among the defined enum values. Enum name: None. Possible values: inpatient, outpatient, both, unspecified

Schema (https://www.dolthub.com/repositories/dolthub/hospital-price-transparency-v3):

create table prices (
    [...]
    inpatient_outpatient enum('INPATIENT', 'OUTPATIENT', 'BOTH', 'UNSPECIFIED') default 'UNSPECIFIED',
    [...]
);

ENUM name is also None which should also be fixed.

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