Zod validation errors when moving from drizzle-kit 0.20.14 to 0.30.2

I'm working on updating the version of Drizzle we use. I've run drizzle-kit up and it updated all of the snapshot files, however I'm still getting validation errors when running the generate command to generate new migrations. It seems that every enum field is showing similar errors (there are hundreds). Here's an example from the array:
{
{
"code": "invalid_type",
"expected": "string",
"received": "object",
"path": [
"enums",
"[object Object].ProtectedAccountBehavior",
"schema"
],
"message": "Expected string, received object"
},
{
{
"code": "invalid_type",
"expected": "string",
"received": "object",
"path": [
"enums",
"[object Object].ProtectedAccountBehavior",
"schema"
],
"message": "Expected string, received object"
},
And in the snapshot JSON:
"public.ProtectedAccountBehavior": {
"name": "ProtectedAccountBehavior",
"schema": "public",
"values": [
"VIRTUAL_ACCOUNT",
"PROXY"
]
}
"public.ProtectedAccountBehavior": {
"name": "ProtectedAccountBehavior",
"schema": "public",
"values": [
"VIRTUAL_ACCOUNT",
"PROXY"
]
}
1 Reply
Nick Harris
Nick HarrisOP2mo ago
nevermind, it was due to a way we were modifying the Drizzle enums

Did you find this page helpful?