Problem
The error message when writing @@unique(fieldA, fieldB) instead of @@unique([fieldA, fieldB]) does not guide the user towards the right solution. What we get is:
Unexpected token. Expected one of: alphanumeric identifier.
Solution
Special-case this bad syntax in the schema parser and return an error that guides the user towards the right syntax.
Alternatives
We could make this valid, but this is a much bigger change, since arguments are supposed to be named, except the leftmost one (optionally).
Additional context
Original issue: prisma/migrate#29
Problem
The error message when writing
@@unique(fieldA, fieldB)instead of@@unique([fieldA, fieldB])does not guide the user towards the right solution. What we get is:Unexpected token. Expected one of: alphanumeric identifier.Solution
Special-case this bad syntax in the schema parser and return an error that guides the user towards the right syntax.
Alternatives
We could make this valid, but this is a much bigger change, since arguments are supposed to be named, except the leftmost one (optionally).
Additional context
Original issue: prisma/migrate#29