fix: make github user id unique

This commit is contained in:
Steve Korshakov 2025-09-19 20:55:16 -07:00
parent d032ec1596
commit 9e73fea852
2 changed files with 29 additions and 21 deletions

View File

@ -0,0 +1,8 @@
/*
Warnings:
- A unique constraint covering the columns `[githubUserId]` on the table `Account` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE INDEX "Account_githubUserId_key" ON "Account"("githubUserId");

View File

@ -27,7 +27,7 @@ model Account {
updatedAt DateTime @updatedAt
settings String?
settingsVersion Int @default(0)
githubUserId String?
githubUserId String? @unique
githubUser GithubUser? @relation(fields: [githubUserId], references: [id])
// Profile