unrecognized_keys

Getting the following error when running generate:pg
ZodError: [
{
"code": "unrecognized_keys",
"keys": [
"primaryKey"
],
"path": [
"alteredTablesWithColumns",
0,
"altered",
1
],
"message": "Unrecognized key(s) in object: 'primaryKey'"
}
]
at handleResult (/home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:2317:24)
at ZodObject.safeParse (/home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:2410:16)
at ZodObject.parse (/home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:2390:29)
at applySnapshotsDiff (/home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:15064:44)
at prepareSQL (/home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:27032:20)
at prepareAndMigratePg (/home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:26884:48)
at Command2.<anonymous> (/home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:49563:9)
at Command2.listener [as _actionHandler] (/home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:827:21)
at /home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:1246:69
at Command2._chainOrCall (/home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:1178:16) {
ZodError: [
{
"code": "unrecognized_keys",
"keys": [
"primaryKey"
],
"path": [
"alteredTablesWithColumns",
0,
"altered",
1
],
"message": "Unrecognized key(s) in object: 'primaryKey'"
}
]
at handleResult (/home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:2317:24)
at ZodObject.safeParse (/home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:2410:16)
at ZodObject.parse (/home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:2390:29)
at applySnapshotsDiff (/home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:15064:44)
at prepareSQL (/home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:27032:20)
at prepareAndMigratePg (/home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:26884:48)
at Command2.<anonymous> (/home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:49563:9)
at Command2.listener [as _actionHandler] (/home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:827:21)
at /home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:1246:69
at Command2._chainOrCall (/home/thdxr/dev/projects/goodvisit/saguaro/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.js:1178:16) {
4 Replies
Andrii Sherman
Had same issue just yesterday https://github.com/drizzle-team/drizzle-kit-mirror/issues/35 Did you just add .primaryKey() to some of a columns? will look into it now
thdxr
thdxrOP2y ago
not exactly sure someone else was hitting this and I made the post
Andrii Sherman
okey, thanks! I'll get back asap. Running tests on this case Seems to be fixed locally. Will try to wrap it in patch release a bit later today Should be fixed in 0.17.5
thdxr
thdxrOP2y ago
ty!
Want results from more Discord servers?
Add your server