© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
26 replies
thdxr

postgres push issue

have a table like this
export const orgUserInfo = pgTable(
  "org_user_info",
  {
    data: jsonb("data"),
    orgId: text("org_id").notNull(),
    userId: text("user_id").notNull(),
  },
  (table) => ({
    primary: primaryKey(table.userId, table.orgId),
  })
)
export const orgUserInfo = pgTable(
  "org_user_info",
  {
    data: jsonb("data"),
    orgId: text("org_id").notNull(),
    userId: text("user_id").notNull(),
  },
  (table) => ({
    primary: primaryKey(table.userId, table.orgId),
  })
)


db push wants to do this
ALTER TABLE "org_user_info" DROP CONSTRAINT "org_user_info_pkey";
ALTER TABLE "org_user_info" ADD PRIMARY KEY ("user_id");
ALTER TABLE "org_user_info" DROP CONSTRAINT "org_user_info_pkey";
ALTER TABLE "org_user_info" ADD PRIMARY KEY ("user_id");
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Cannot push postgres
Drizzle TeamDTDrizzle Team / help
2y ago
Issue with push command
Drizzle TeamDTDrizzle Team / help
2y ago
Mysterious Postgres Schema Issue
Drizzle TeamDTDrizzle Team / help
2y ago
[SOLVED] Issue with Postgres transactions
Drizzle TeamDTDrizzle Team / help
17mo ago