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
add index for note's type + some fixes
azivner9fa6c0918c19
diff --git a/db/migrations/0092__add_type_index.sql b/db/migrations/0092__add_type_index.sqlnew file mode 100644index 0000000000..955d35dc67--- /dev/null+++ b/db/migrations/0092__add_type_index.sql@@ -0,0 +1,2 @@+create index IDX_notes_type+ on notes (type);\ No newline at end of filediff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.cssindex 83fda79832..7b4d4446ff 100644--- a/src/public/stylesheets/style.css+++ b/src/public/stylesheets/style.css@@ -336,4 +336,15 @@ div.ui-tooltip {.child-overview a {color: #444;+}++#sql-console-query {+ height: 150px;+ width: 100%;+ border: 1px solid #ccc;+ margin-bottom: 10px;+}++#sql-console-query .CodeMirror {+ height: 150px;}\ No newline at end of filediff --git a/src/services/app_info.js b/src/services/app_info.jsindex c8433345f6..ee2ea68207 100644--- a/src/services/app_info.js+++ b/src/services/app_info.js@@ -3,7 +3,7 @@const build = require('./build');const packageJson = require('../../package');-const APP_DB_VERSION = 91;+const APP_DB_VERSION = 92;module.exports = {appVersion: packageJson.version,diff --git a/src/services/consistency_checks.js b/src/services/consistency_checks.jsindex d8b0921c38..d326aa972b 100644--- a/src/services/consistency_checks.js+++ b/src/services/consistency_checks.js@@ -3,6 +3,7 @@const sql = require('./sql');const sqlInit = require('./sql_init');const log = require('./log');+const utils = require('./utils');const messagingService = require('./messaging');const syncMutexService = require('./sync_mutex');const cls = require('./cls');diff --git a/src/services/sync.js b/src/services/sync.jsindex 33a26602ab..38bef6a854 100644--- a/src/services/sync.js+++ b/src/services/sync.js@@ -212,7 +212,8 @@ const primaryKeys = {"images": "imageId","note_images": "noteImageId","labels": "labelId",- "api_tokens": "apiTokenId"+ "api_tokens": "apiTokenId",+ "options": "name"};async function getEntityRow(entityName, entityId) {diff --git a/src/views/index.ejs b/src/views/index.ejsindex 942dc0c472..5aa4397467 100644--- a/src/views/index.ejs+++ b/src/views/index.ejs@@ -424,7 +424,7 @@</div><div id="sql-console-dialog" title="SQL console" style="display: none; padding: 20px;">- <div style="height: 150px; width: 100%; border: 1px solid #ccc; margin-bottom: 10px;" id="sql-console-query"></div>+ <div id="sql-console-query"></div><div style="text-align: center"><button class="btn btn-danger" id="sql-console-execute">Execute <kbd>CTRL+ENTER</kbd></button>