Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
simplified table stats
zadam9f472b353a2c
diff --git a/src/services/consistency_checks.js b/src/services/consistency_checks.jsindex 99ee0276c8..15c7d0087f 100644--- a/src/services/consistency_checks.js+++ b/src/services/consistency_checks.js@@ -566,17 +566,15 @@ class ConsistencyChecks {}runDbDiagnostics() {- function showEntityStat(tableName) {+ function getTableCount(tableName) {const count = sql.getValue(`SELECT COUNT(1) FROM ${tableName}`);- log.info(`${tableName}: ${count}`);+ return `${tableName}: ${count}`;}- showEntityStat("notes");- showEntityStat("note_revisions");- showEntityStat("branches");- showEntityStat("attributes");- showEntityStat("api_tokens");+ const tables = [ "notes", "note_revisions", "branches", "attributes", "api_tokens" ];++ log.info("Table counts: " + tables.map(tableName => getTableCount(tableName)).join(", "));}async runChecks() {