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');