-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with UK enum value #238
Comments
Most of the time its a mermaid thing. I'll see if I haven't wrapped enums in quotes already. That's typically the route to get around some mermaid specifics. |
Gave it a shot and it looks like the enums were not wrapped in quotes already. When I wrote out a schema generator erd {
provider = "node ./dist/index.js"
output = "../../__tests__/238.png"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model Deployment {
id String @id @default(uuid()) @db.Uuid
region DeploymentRegions
}
enum DeploymentRegions {
EU
UK
} and ran locally with the quotes I was still getting an error. As it turns out the enums are not something you can wrap in quotes. All cases started to fail afterwards that used enums. I did get the above to pass by switching UK to anything else so it might be a reserved word for mermaid. |
What could be done is
generator erd {
...
ignoreEnums = true
}
What are your thoughts? |
I've found an issue with generation when an enum contains the value
UK
. e.g.I get an error which looks like:
Running the command I get:
It looks to be related to mermaids using
UK
to indicate unique key (link).We've gotten around it by disabling enum generation but a fix would be nice, either by escaping the value in the
.mmd
file (I couldn't see if this was possible) or by moving away from mermaids (as a fix to #102)The text was updated successfully, but these errors were encountered: