We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drizzle-kit push
I cloned this repo and successfully got it running. The drizzle-kit push command works the first time and my DB looks good.
However, if I add anything to the DB schema (adding a new table, not modifying existing ones at all), drizzle-kit push fails with this error:
[✓] Pulling schema from database... PostgresError: column "provider_id" is in a primary key
This seems related to this drizzle-kit issue: drizzle-team/drizzle-orm#2626
I was able to get around the issue once by adding a name to the primaryKey, but then it fails again on subsequent changes.
The text was updated successfully, but these errors were encountered:
The fix for me was adding .notNull() to both PKs.
.notNull()
61b9654
export const oauthAccount = pgTable( "oauth_account", { - provider_id: text(), - provider_user_id: text(), + provider_id: text().notNull(), + provider_user_id: text().notNull(), user_id: integer() .notNull() .references(() => user.id), }, (table) => [primaryKey({ columns: [table.provider_id, table.provider_user_id] })], );
Let me know if that works on your end :)
Sorry, something went wrong.
No branches or pull requests
I cloned this repo and successfully got it running. The
drizzle-kit push
command works the first time and my DB looks good.However, if I add anything to the DB schema (adding a new table, not modifying existing ones at all),
drizzle-kit push
fails with this error:This seems related to this drizzle-kit issue: drizzle-team/drizzle-orm#2626
I was able to get around the issue once by adding a name to the primaryKey, but then it fails again on subsequent changes.
The text was updated successfully, but these errors were encountered: