Skip to content

Commit

Permalink
fix index error
Browse files Browse the repository at this point in the history
  • Loading branch information
RedBeardEth committed Jan 12, 2024
1 parent e64dd0a commit fb52556
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/db/schema/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const accounts = pgSqlTable(
session_state: varchar("session_state", { length: 255 }),
},
(account) => ({
compoundKey: primaryKey(account.provider, account.providerAccountId),
compoundKey: primaryKey({ columns: [account.provider, account.providerAccountId]}),
userIdIdx: index("userId_idx").on(account.userId),
}),
);
Expand All @@ -63,7 +63,7 @@ export const sessions = pgSqlTable(
expires: timestamp("expires", { mode: "date" }).notNull(),
},
(session) => ({
userIdIdx: index("userId_idx").on(session.userId),
userIdIdx2: index("userId_idx2").on(session.userId),
}),
);

Expand All @@ -79,6 +79,6 @@ export const verificationTokens = pgSqlTable(
expires: timestamp("expires", { mode: "date" }).notNull(),
},
(vt) => ({
compoundKey: primaryKey(vt.identifier, vt.token),
compoundKey: primaryKey({columns: [vt.identifier, vt.token]}),
}),
);

0 comments on commit fb52556

Please sign in to comment.