Skip checklist db migration script if no owner exists
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user