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
This is happening to me too when renaming a column which is a part of a composite primary key. After selecting "rename column" option here:
Is issue_id column in issue_upvote table created or renamed from another column?
❯ + issue_id create column
~ feedback_id › issue_id rename column
I temporarily fixed it by changing node_modules/.pnpm/drizzle-kit@0.20.14/node_modules/drizzle-kit/bin.cjs:17115
from: constraintName: json1.tables[tableName].compositePrimaryKeys[PgSquasher.unsquashPK(it).name].name
to constraintName: json1.tables[tableName]?.compositePrimaryKeys[PgSquasher.unsquashPK(it).name].name
This issue did result in this line: ALTER TABLE "lh"."issue_upvote" DROP CONSTRAINT "undefined";--> statement-breakpoint
so I fixed it by doing: ALTER TABLE "lh"."issue_upvote" DROP CONSTRAINT "feedback_upvote_feedback_id_user_id_pk";--> statement-breakpoint
When removed a composite primary key and renamed a pgTable defined:
Throws the error when
npx drizzle-kit generate:pg
:Versions:
The text was updated successfully, but these errors were encountered: