Eduard Dyckman
Eduard Dyckman
DTDrizzle Team
Created by Eduard Dyckman on 12/9/2024 in #help
Primary key is not applied
Drizzle doesn't generate a primary key statement in the migration. Here is the schema:
export const usersTable = pgTable(
"users",
{
slackUserId: text().notNull(),
slackTeamId: text().notNull(),
tokenSet: jsonb().notNull(),
createdAt: timestamp().notNull().defaultNow(),
},
(t) => [{ pk: primaryKey({ columns: [t.slackUserId, t.slackTeamId] }) }],
);
export const usersTable = pgTable(
"users",
{
slackUserId: text().notNull(),
slackTeamId: text().notNull(),
tokenSet: jsonb().notNull(),
createdAt: timestamp().notNull().defaultNow(),
},
(t) => [{ pk: primaryKey({ columns: [t.slackUserId, t.slackTeamId] }) }],
);
drizzle-kit: "^0.30.0" drizzle-orm: "^0.38.0"
4 replies