mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
initialization and schema fixes, closes #111
This commit is contained in:
@@ -94,6 +94,12 @@ async function isDbUpToDate() {
|
||||
}
|
||||
|
||||
async function isUserInitialized() {
|
||||
const optionsTable = await sql.getRows("SELECT name FROM sqlite_master WHERE type='table' AND name='options'");
|
||||
|
||||
if (optionsTable.length !== 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const username = await sql.getValue("SELECT value FROM options WHERE name = 'username'");
|
||||
|
||||
return !!username;
|
||||
|
||||
Reference in New Issue
Block a user