feat(ee): personal spaces (#2298)

* feat(ee): personal spaces

* pref

* feat: on-demand only

* error notification
This commit is contained in:
Philip Okugbe
2026-06-20 14:27:41 +01:00
committed by GitHub
parent 510199cf04
commit d68e241f45
23 changed files with 366 additions and 9 deletions
@@ -251,4 +251,24 @@ export class WorkspaceRepo {
.executeTakeFirst();
}
async updateSpaceSettings(
workspaceId: string,
prefKey: string,
prefValue: string | boolean,
trx?: KyselyTransaction,
) {
const db = dbOrTx(this.db, trx);
return db
.updateTable('workspaces')
.set({
settings: sql`COALESCE(settings, '{}'::jsonb)
|| jsonb_build_object('spaces', COALESCE(settings->'spaces', '{}'::jsonb)
|| jsonb_build_object('${sql.raw(prefKey)}', ${sql.lit(prefValue)}))`,
updatedAt: new Date(),
})
.where('id', '=', workspaceId)
.returning(this.baseFields)
.executeTakeFirst();
}
}