diff options
| author | Frank <[email protected]> | 2025-10-16 22:27:28 -0400 |
|---|---|---|
| committer | Frank <[email protected]> | 2025-10-16 22:28:34 -0400 |
| commit | 1947580b08b04fc8d81841fa6017f721dec6a3da (patch) | |
| tree | 5c157189a344ca22d49dac396261182d45251f65 /packages/console/core/src/schema | |
| parent | ca9b13e8a2626aca3bb28882cff395c18e0a215c (diff) | |
| download | opencode-1947580b08b04fc8d81841fa6017f721dec6a3da.tar.gz opencode-1947580b08b04fc8d81841fa6017f721dec6a3da.zip | |
wip: zen
Diffstat (limited to 'packages/console/core/src/schema')
| -rw-r--r-- | packages/console/core/src/schema/account.sql.ts | 13 | ||||
| -rw-r--r-- | packages/console/core/src/schema/auth.sql.ts | 4 |
2 files changed, 6 insertions, 11 deletions
diff --git a/packages/console/core/src/schema/account.sql.ts b/packages/console/core/src/schema/account.sql.ts index 4d9937114..7bbbe68f9 100644 --- a/packages/console/core/src/schema/account.sql.ts +++ b/packages/console/core/src/schema/account.sql.ts @@ -1,12 +1,7 @@ import { mysqlTable, uniqueIndex, varchar } from "drizzle-orm/mysql-core" import { id, timestamps } from "../drizzle/types" -export const AccountTable = mysqlTable( - "account", - { - id: id(), - ...timestamps, - email: varchar("email", { length: 255 }).notNull(), - }, - (table) => [uniqueIndex("email").on(table.email)], -) +export const AccountTable = mysqlTable("account", { + id: id(), + ...timestamps, +}) diff --git a/packages/console/core/src/schema/auth.sql.ts b/packages/console/core/src/schema/auth.sql.ts index be2244ef3..1e12f98d4 100644 --- a/packages/console/core/src/schema/auth.sql.ts +++ b/packages/console/core/src/schema/auth.sql.ts @@ -1,4 +1,4 @@ -import { mysqlEnum, mysqlTable, uniqueIndex, varchar } from "drizzle-orm/mysql-core" +import { index, mysqlEnum, mysqlTable, 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,5 @@ export const AuthTable = mysqlTable( subject: varchar("subject", { length: 255 }).notNull(), accountID: ulid("account_id").notNull(), }, - (table) => [uniqueIndex("provider").on(table.provider, table.subject)], + (table) => [uniqueIndex("provider").on(table.provider, table.subject), index("account_id").on(table.accountID)], ) |
