18 lines
571 B
TypeScript
18 lines
571 B
TypeScript
import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core"
|
|
import { Timestamps } from "../database/schema.sql"
|
|
import { Project } from "../project"
|
|
|
|
export const ProjectTable = sqliteTable("project", {
|
|
id: text().$type<Project.ID>().primaryKey(),
|
|
worktree: text().notNull(),
|
|
vcs: text(),
|
|
name: text(),
|
|
icon_url: text(),
|
|
icon_url_override: text(),
|
|
icon_color: text(),
|
|
...Timestamps,
|
|
time_initialized: integer(),
|
|
sandboxes: text({ mode: "json" }).notNull().$type<string[]>(),
|
|
commands: text({ mode: "json" }).$type<{ start?: string }>(),
|
|
})
|