Make bot types an extension of the bot's kind
Coordinator and worker come from bots.kind; bot_types now only holds workspace_admin (was admin), each row naming its workspace, with no scope field. Rows from v0.2.8 and earlier are fixed at boot by migrateBotTypes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -80,7 +80,7 @@ async function push({
|
||||
const admin_workspace_ids = (
|
||||
(
|
||||
await BunSQLite.sql<{ workspace_id: number }>({
|
||||
sql: `SELECT workspace_id FROM bot_types WHERE bot_id = ? AND bot_type = 'admin' AND workspace_id IS NOT NULL`,
|
||||
sql: `SELECT workspace_id FROM bot_types WHERE bot_id = ? AND bot_type = 'workspace_admin' AND workspace_id IS NOT NULL`,
|
||||
values: [bot_id],
|
||||
})
|
||||
).payload || []
|
||||
|
||||
Reference in New Issue
Block a user