summaryrefslogtreecommitdiffhomepage
path: root/cloud/core/src/schema/account.sql.ts
blob: 4d9937114750b73a15bcf17df1f9702132d699df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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)],
)