fix(opencode): enforce storage path invariants (#29666)
This commit is contained in:
parent
a821029258
commit
f0c7febb02
15 changed files with 1993 additions and 17 deletions
|
|
@ -1,10 +1,11 @@
|
|||
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: text().notNull(),
|
||||
worktree: DatabasePath.absoluteColumn().notNull(),
|
||||
vcs: text(),
|
||||
name: text(),
|
||||
icon_url: text(),
|
||||
|
|
@ -12,6 +13,6 @@ export const ProjectTable = sqliteTable("project", {
|
|||
icon_color: text(),
|
||||
...Timestamps,
|
||||
time_initialized: integer(),
|
||||
sandboxes: text({ mode: "json" }).notNull().$type<string[]>(),
|
||||
sandboxes: DatabasePath.absoluteArrayColumn().notNull(),
|
||||
commands: text({ mode: "json" }).$type<{ start?: string }>(),
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue