Download packages/console/core/src/schema/key.sql.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 562 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/console/core/src/schema/key.sql.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/console/core/src/schema/key.sql.ts
-
curl -L -o key.sql.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/console/core/src/schema/key.sql.ts
562 Bytes
| import { mysqlTable, varchar, uniqueIndex } from "drizzle-orm/mysql-core" | |
| import { timestamps, ulid, utc, workspaceColumns } from "../drizzle/types" | |
| import { workspaceIndexes } from "./workspace.sql" | |
| export const KeyTable = mysqlTable( | |
| "key", | |
| { | |
| ...workspaceColumns, | |
| ...timestamps, | |
| name: varchar("name", { length: 255 }).notNull(), | |
| key: varchar("key", { length: 255 }).notNull(), | |
| userID: ulid("user_id").notNull(), | |
| timeUsed: utc("time_used"), | |
| }, | |
| (table) => [...workspaceIndexes(table), uniqueIndex("global_key").on(table.key)], | |
| ) | |