Error while attempting new push
I am using AuthJS Beta (following their instructions) and basic level drizzle-orm schema setup but when I push my newly made changes into the
users
table I get the following error:
I've made a project in drizzle and I have changed my table and added new columns, when attempting to push I get the following error. Keep in mind that I already have users in my app.
error:
Warning You are about to execute current statements:
ALTER TABLE "authenticator" DROP CONSTRAINT authenticator_userId_credentialID_pk;
--> statement-breakpoint
ALTER TABLE "authenticator" ADD CONSTRAINT authenticator_userId_credentialID_pk PRIMARY KEY(userId,credentialID);
error: constraint "authenticator_userid_credentialid_pk" of relation "authenticator" does not exist
at /Users/skylerx/Desktop/school-final-project/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:77692:15
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.query (/Users/skylerx/Desktop/school-final-project/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:119631:26)
at async pgPush (/Users/skylerx/Desktop/school-final-project/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:122581:13)
at async _Command.<anonymous> (/Users/skylerx/Desktop/school-final-project/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:129702:7) {
length: 162,
severity: 'ERROR',
code: '42704',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'tablecmds.c',
line: '11976',
routine: 'ATExecDropConstraint'
}
I've made a project in drizzle and I have changed my table and added new columns, when attempting to push I get the following error. Keep in mind that I already have users in my app.
error:
Warning You are about to execute current statements:
ALTER TABLE "authenticator" DROP CONSTRAINT authenticator_userId_credentialID_pk;
--> statement-breakpoint
ALTER TABLE "authenticator" ADD CONSTRAINT authenticator_userId_credentialID_pk PRIMARY KEY(userId,credentialID);
error: constraint "authenticator_userid_credentialid_pk" of relation "authenticator" does not exist
at /Users/skylerx/Desktop/school-final-project/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:77692:15
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.query (/Users/skylerx/Desktop/school-final-project/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:119631:26)
at async pgPush (/Users/skylerx/Desktop/school-final-project/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:122581:13)
at async _Command.<anonymous> (/Users/skylerx/Desktop/school-final-project/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:129702:7) {
length: 162,
severity: 'ERROR',
code: '42704',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'tablecmds.c',
line: '11976',
routine: 'ATExecDropConstraint'
}
2 Replies