feat(auth) : notnull
This commit is contained in:
+2
-2
@@ -81,7 +81,7 @@ export const accounts = authSchema.table(
|
|||||||
"account",
|
"account",
|
||||||
{
|
{
|
||||||
id: text("id").primaryKey(),
|
id: text("id").primaryKey(),
|
||||||
issuer: text("issuer").notNull(),
|
issuer: text("issuer"),
|
||||||
accountId: text("account_id").notNull(),
|
accountId: text("account_id").notNull(),
|
||||||
providerId: text("provider_id").notNull(),
|
providerId: text("provider_id").notNull(),
|
||||||
userId: text("user_id")
|
userId: text("user_id")
|
||||||
@@ -101,7 +101,7 @@ export const accounts = authSchema.table(
|
|||||||
...timestamps,
|
...timestamps,
|
||||||
},
|
},
|
||||||
(table) => [
|
(table) => [
|
||||||
uniqueIndex("account_issuer_unique").on(table.issuer, table.accountId),
|
uniqueIndex("account_provider_unique").on(table.providerId, table.accountId),
|
||||||
index("account_user_id_idx").on(table.userId),
|
index("account_user_id_idx").on(table.userId),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
DROP INDEX "auth"."account_issuer_unique";--> statement-breakpoint
|
||||||
|
ALTER TABLE "auth"."account" ALTER COLUMN "issuer" DROP NOT NULL;--> statement-breakpoint
|
||||||
|
CREATE UNIQUE INDEX "account_provider_unique" ON "auth"."account" USING btree ("provider_id","account_id");
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -344,6 +344,13 @@
|
|||||||
"when": 1789823911760,
|
"when": 1789823911760,
|
||||||
"tag": "0048_lazy_reptil",
|
"tag": "0048_lazy_reptil",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 49,
|
||||||
|
"version": "7",
|
||||||
|
"when": 1790078318799,
|
||||||
|
"tag": "0049_better_auth_issuer_cleanup",
|
||||||
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user