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:
@@ -9,6 +9,7 @@ import botsQueue from "./bots-queue";
|
||||
import fileIngest from "./file-ingest";
|
||||
import liveRelay from "./live-relay";
|
||||
import enableForeignKeys from "./functions/backend/db/enable-foreign-keys";
|
||||
import migrateBotTypes from "./functions/backend/db/bot-types/migrate-bot-types";
|
||||
import handleComputerProxy from "./functions/server/computers/handle-computer-proxy";
|
||||
import handlePwaFile from "./functions/server/pwa/handle-pwa-file";
|
||||
import handleInstallIconFile from "./functions/server/pwa/handle-install-icon-file";
|
||||
@@ -30,6 +31,9 @@ const development = process.env.NODE_ENV == "development";
|
||||
const port = process.env.PORT || 7227;
|
||||
|
||||
await enableForeignKeys();
|
||||
await migrateBotTypes().catch((error) =>
|
||||
logError({ title: "Could not migrate bot types", error }).catch(() => {}),
|
||||
);
|
||||
await bunext.bunextInit();
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user