workspace.sql.ts 419 B

123456789101112
  1. import { sqliteTable, text } from "drizzle-orm/sqlite-core"
  2. import { ProjectTable } from "@/project/project.sql"
  3. import type { Config } from "./config"
  4. export const WorkspaceTable = sqliteTable("workspace", {
  5. id: text().primaryKey(),
  6. branch: text(),
  7. project_id: text()
  8. .notNull()
  9. .references(() => ProjectTable.id, { onDelete: "cascade" }),
  10. config: text({ mode: "json" }).notNull().$type<Config>(),
  11. })