mirror of
https://gitee.com/zhangsken/opencode.git
synced 2026-10-16 10:30:01 +08:00
19 lines
641 B
TypeScript
19 lines
641 B
TypeScript
import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core"
|
|
import * as DatabasePath from "../database/path"
|
|
import { Timestamps } from "../database/schema.sql"
|
|
import { ProjectV2 } from "../project"
|
|
|
|
export const ProjectTable = sqliteTable("project", {
|
|
id: text().$type<ProjectV2.ID>().primaryKey(),
|
|
worktree: DatabasePath.absoluteColumn().notNull(),
|
|
vcs: text(),
|
|
name: text(),
|
|
icon_url: text(),
|
|
icon_url_override: text(),
|
|
icon_color: text(),
|
|
...Timestamps,
|
|
time_initialized: integer(),
|
|
sandboxes: DatabasePath.absoluteArrayColumn().notNull(),
|
|
commands: text({ mode: "json" }).$type<{ start?: string }>(),
|
|
})
|