-
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Enum:
enum UserRole {
ADMIN @map("admin")
USER @map("user")
@@map("user_role")
}
- Enum values should be lowercase admin/user, but in the database they appear in uppercase. SQLite uses TEXT type for enums and adds ADMIN. PostgreSQL returns an error because SQL uses an uppercase value.
- The schema file is missing information about the value map/enumeration attributes (e.g., value
ADMIN
has@map
attribute with valueadmin
, orenum UserRole
has an@map
attribute with valueuser_role
).
Repo with sqlite (inserting via zenstack, getting updated data via the raw better-sqlite library to prevent kysely/zenstack mapping): https://github.com/DoctorFTB/zenstack-v3-enum-bug
If needed, I can also create a repo with PostgreSQL.
Metadata
Metadata
Assignees
Labels
No labels