fix(auth): add account issuer migration
CI / Verify (push) Successful in 1m10s
CI / Build immutable images and deploy (push) Has been skipped

This commit is contained in:
2026-08-29 07:39:20 +00:00 Unverified
parent adf71ed7d8
commit c5a3fed1f0
4 changed files with 1951 additions and 4 deletions
+2 -4
View File
@@ -62,6 +62,7 @@ export const accounts = pgTable(
"account",
{
id: text("id").primaryKey(),
issuer: text("issuer").notNull(),
accountId: text("account_id").notNull(),
providerId: text("provider_id").notNull(),
userId: text("user_id")
@@ -81,10 +82,7 @@ export const accounts = pgTable(
...timestamps,
},
(table) => [
uniqueIndex("account_provider_unique").on(
table.providerId,
table.accountId,
),
uniqueIndex("account_issuer_unique").on(table.issuer, table.accountId),
index("account_user_id_idx").on(table.userId),
],
);
+3
View File
@@ -0,0 +1,3 @@
DROP INDEX "account_provider_unique";--> statement-breakpoint
ALTER TABLE "account" ADD COLUMN "issuer" text NOT NULL;--> statement-breakpoint
CREATE UNIQUE INDEX "account_issuer_unique" ON "account" USING btree ("issuer","account_id");
File diff suppressed because it is too large Load Diff
+7
View File
@@ -8,6 +8,13 @@
"when": 1787932993638,
"tag": "0000_free_lord_tyger",
"breakpoints": true
},
{
"idx": 1,
"version": "7",
"when": 1787989072634,
"tag": "0001_lumpy_marauders",
"breakpoints": true
}
]
}