From f0fb420a8da115d2535e906312256ff4c4e1bd76 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Tue, 3 Feb 2026 18:41:39 +0100 Subject: [PATCH] Skip checklist db migration script if no owner exists --- migrations/20260201120606-apps-ensure-checklist-properties.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migrations/20260201120606-apps-ensure-checklist-properties.js b/migrations/20260201120606-apps-ensure-checklist-properties.js index c6a493ba7..37456b6b4 100644 --- a/migrations/20260201120606-apps-ensure-checklist-properties.js +++ b/migrations/20260201120606-apps-ensure-checklist-properties.js @@ -2,6 +2,8 @@ exports.up = async function (db) { const owner = await db.runSql('SELECT username FROM users WHERE role="owner" LIMIT 1'); + if (!owner[0]) return; + const ownerUsername = owner[0].username; const apps = await db.runSql('SELECT * FROM apps');