feat(core): add workspace_id to session table (#15410)

This commit is contained in:
James Long 2026-02-28 22:09:53 -05:00 committed by GitHub
commit 3ee1653f40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 1052 additions and 1 deletions

View file

@ -15,6 +15,7 @@ export const SessionTable = sqliteTable(
project_id: text()
.notNull()
.references(() => ProjectTable.id, { onDelete: "cascade" }),
workspace_id: text(),
parent_id: text(),
slug: text().notNull(),
directory: text().notNull(),
@ -31,7 +32,11 @@ export const SessionTable = sqliteTable(
time_compacting: integer(),
time_archived: integer(),
},
(table) => [index("session_project_idx").on(table.project_id), index("session_parent_idx").on(table.parent_id)],
(table) => [
index("session_project_idx").on(table.project_id),
index("session_workspace_idx").on(table.workspace_id),
index("session_parent_idx").on(table.parent_id),
],
)
export const MessageTable = sqliteTable(