mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 13:54:01 +00:00
17 lines
492 B
TypeScript
17 lines
492 B
TypeScript
import { sqliteTable, text } from "drizzle-orm/sqlite-core"
|
|
import { ProjectTable } from "../project/project.sql"
|
|
import type { ProjectID } from "../project/schema"
|
|
|
|
export const WorkspaceTable = sqliteTable("workspace", {
|
|
id: text().primaryKey(),
|
|
type: text().notNull(),
|
|
branch: text(),
|
|
name: text(),
|
|
directory: text(),
|
|
extra: text({ mode: "json" }),
|
|
project_id: text()
|
|
.$type<ProjectID>()
|
|
.notNull()
|
|
.references(() => ProjectTable.id, { onDelete: "cascade" }),
|
|
})
|