zen: track region
This commit is contained in:
parent
d71454c701
commit
e9d4ca7e0f
27 changed files with 3343 additions and 9 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { primaryKey, mysqlTable, uniqueIndex, varchar } from "drizzle-orm/mysql-core"
|
||||
import { json, primaryKey, mysqlTable, uniqueIndex, varchar } from "drizzle-orm/mysql-core"
|
||||
import { timestamps, ulid } from "../drizzle/types"
|
||||
|
||||
export const WorkspaceTable = mysqlTable(
|
||||
|
|
@ -7,6 +7,7 @@ export const WorkspaceTable = mysqlTable(
|
|||
id: ulid("id").notNull().primaryKey(),
|
||||
slug: varchar("slug", { length: 255 }),
|
||||
name: varchar("name", { length: 255 }).notNull(),
|
||||
region: json("region").$type<("us" | "eu" | "sg" | "cn")[]>(),
|
||||
...timestamps,
|
||||
},
|
||||
(table) => [uniqueIndex("slug").on(table.slug)],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue