From 34ef93771dc00600a8773867a0a7e890406eff06 Mon Sep 17 00:00:00 2001 From: mauriceboe Date: Fri, 3 Jul 2026 19:23:58 +0200 Subject: [PATCH] fix(plugins): backfill enabled for any plugin not explicitly deactivated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit status at migration time can be error/stopped/starting after a crash or shutdown, not just 'active' — so backfill enabled=1 for everything except 'inactive' (the only status deactivate() sets). --- server/src/db/migrations.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/db/migrations.ts b/server/src/db/migrations.ts index 8eb97be44..8d4bfd82c 100644 --- a/server/src/db/migrations.ts +++ b/server/src/db/migrations.ts @@ -3358,7 +3358,9 @@ function runMigrations(db: Database.Database): void { // Boot now retries every enabled plugin regardless of last status. () => { db.exec("ALTER TABLE plugins ADD COLUMN enabled INTEGER NOT NULL DEFAULT 0;"); - db.exec("UPDATE plugins SET enabled = 1 WHERE status = 'active';"); + // Anything not explicitly deactivated was meant to be on ('inactive' is the + // only status deactivate() sets; a crash/shutdown could leave error/stopped/starting). + db.exec("UPDATE plugins SET enabled = 1 WHERE status != 'inactive';"); }, ];