wip: gateway
This commit is contained in:
parent
c7bb19ad07
commit
183e0911b7
101 changed files with 9218 additions and 57 deletions
16
cloud/core/src/schema/key.sql.ts
Normal file
16
cloud/core/src/schema/key.sql.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { text, pgTable, varchar, uniqueIndex } from "drizzle-orm/pg-core"
|
||||
import { timestamps, utc, workspaceColumns } from "../drizzle/types"
|
||||
import { workspaceIndexes } from "./workspace.sql"
|
||||
|
||||
export const KeyTable = pgTable(
|
||||
"key",
|
||||
{
|
||||
...workspaceColumns,
|
||||
...timestamps,
|
||||
userID: text("user_id").notNull(),
|
||||
name: varchar("name", { length: 255 }).notNull(),
|
||||
key: varchar("key", { length: 255 }).notNull(),
|
||||
timeUsed: utc("time_used"),
|
||||
},
|
||||
(table) => [...workspaceIndexes(table), uniqueIndex("global_key").on(table.key)],
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue