summaryrefslogtreecommitdiffhomepage
path: root/packages/console/core/src/schema/auth.sql.ts
diff options
context:
space:
mode:
authorFrank <[email protected]>2025-10-16 23:16:23 -0400
committeropencode <[email protected]>2025-10-17 03:17:07 +0000
commitdd581e8577c7345c98e38e90f54b359560da74e1 (patch)
treea28a487a86eca61f7bcea610d9bf3c2afd7bd839 /packages/console/core/src/schema/auth.sql.ts
parentbad01d76de9461ed4a7eda5b15cb6151e56ad0e1 (diff)
downloadopencode-dd581e8577c7345c98e38e90f54b359560da74e1.tar.gz
opencode-dd581e8577c7345c98e38e90f54b359560da74e1.zip
wip: zen
Diffstat (limited to 'packages/console/core/src/schema/auth.sql.ts')
-rw-r--r--packages/console/core/src/schema/auth.sql.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/console/core/src/schema/auth.sql.ts b/packages/console/core/src/schema/auth.sql.ts
index 1e12f98d4..27c926d6f 100644
--- a/packages/console/core/src/schema/auth.sql.ts
+++ b/packages/console/core/src/schema/auth.sql.ts
@@ -1,4 +1,4 @@
-import { index, mysqlEnum, mysqlTable, uniqueIndex, varchar } from "drizzle-orm/mysql-core"
+import { index, mysqlEnum, mysqlTable, primaryKey, uniqueIndex, varchar } from "drizzle-orm/mysql-core"
import { id, timestamps, ulid } from "../drizzle/types"
export const AuthProvider = ["email", "github", "google"] as const
@@ -12,5 +12,9 @@ export const AuthTable = mysqlTable(
subject: varchar("subject", { length: 255 }).notNull(),
accountID: ulid("account_id").notNull(),
},
- (table) => [uniqueIndex("provider").on(table.provider, table.subject), index("account_id").on(table.accountID)],
+ (table) => [
+ primaryKey({ columns: [table.id] }),
+ uniqueIndex("provider").on(table.provider, table.subject),
+ index("account_id").on(table.accountID),
+ ],
)