Enum as primary key for roles (sqlite)
I'm pretty new to Drizzle and database schemas in general so bear with me if this is stupid.
I'm creating a crud application with some users with a role table. The roles are quite defined so I thought I can use a enum with the role "slug" as the ID:
This does seem to work (is it a good idea though?) but the inferred roleId when querying is a string. Only when I join it is a string literal/enum:
Is this intended? Is this a bad pattern? Any feedback would be greatly appreciated!
I'm creating a crud application with some users with a role table. The roles are quite defined so I thought I can use a enum with the role "slug" as the ID:
This does seem to work (is it a good idea though?) but the inferred roleId when querying is a string. Only when I join it is a string literal/enum:
Is this intended? Is this a bad pattern? Any feedback would be greatly appreciated!

