feat(core): allow external workspace creation (#26212)

This commit is contained in:
James Long 2026-05-08 11:09:12 -04:00 committed by GitHub
commit c818c9dcb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 2039 additions and 145 deletions

View file

@ -1,4 +1,4 @@
import { sqliteTable, text } from "drizzle-orm/sqlite-core"
import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core"
import { ProjectTable } from "../project/project.sql"
import type { ProjectID } from "../project/schema"
import type { WorkspaceID } from "./schema"
@ -14,4 +14,7 @@ export const WorkspaceTable = sqliteTable("workspace", {
.$type<ProjectID>()
.notNull()
.references(() => ProjectTable.id, { onDelete: "cascade" }),
time_used: integer()
.notNull()
.$default(() => Date.now()),
})