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
If there is an enum with capital letters in its name, the .sql export is broken such that the enum can't be referenced (or else I haven't been able to figure out how).
Example
Take an example DBML file:
Enum UserRole{
"Super Admin"
"Super Ultra Admin"
}
Table User {
role UserRole
...
}
This seems fine except that SQL loves to ignore capitalization, so upon running the .sql I get ERROR: type "userrole" does not exist. The correct .sql output would have the enum type quoted to reference it correctly:
CREATE TABLE "User" (
"role" "UserRole"
...
)
Attempted workaround
If you use quotes in the DBML like so, you might expect those quotes to carry through to the .sql file:
Table User {
role "UserRole"
...
}
but the above DBML generates the same unquoted SQL, causing the same problem as earlier.
Apologies for the edge case!
The text was updated successfully, but these errors were encountered:
Problem
If there is an enum with capital letters in its name, the .sql export is broken such that the enum can't be referenced (or else I haven't been able to figure out how).
Example
Take an example DBML file:
When I convert that to Postgresql, it looks like:
This seems fine except that SQL loves to ignore capitalization, so upon running the
.sql
I getERROR: type "userrole" does not exist
. The correct .sql output would have the enum type quoted to reference it correctly:Attempted workaround
If you use quotes in the DBML like so, you might expect those quotes to carry through to the .sql file:
but the above DBML generates the same unquoted SQL, causing the same problem as earlier.
Apologies for the edge case!
The text was updated successfully, but these errors were encountered: