From 9fa6c0918c199293299ba471136456406e824dcf Mon Sep 17 00:00:00 2001 From: azivner Date: Mon, 21 May 2018 20:12:46 -0400 Subject: [PATCH] add index for note's type + some fixes --- db/migrations/0092__add_type_index.sql | 2 ++ src/public/stylesheets/style.css | 11 +++++++++++ src/services/app_info.js | 2 +- src/services/consistency_checks.js | 1 + src/services/sync.js | 3 ++- src/views/index.ejs | 2 +- 6 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 db/migrations/0092__add_type_index.sql diff --git a/db/migrations/0092__add_type_index.sql b/db/migrations/0092__add_type_index.sql new file mode 100644 index 000000000..955d35dc6 --- /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 file diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css index 83fda7983..7b4d4446f 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 file diff --git a/src/services/app_info.js b/src/services/app_info.js index c8433345f..ee2ea6820 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.js index d8b0921c3..d326aa972 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.js index 33a26602a..38bef6a85 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.ejs index 942dc0c47..5aa439746 100644 --- a/src/views/index.ejs +++ b/src/views/index.ejs @@ -424,7 +424,7 @@