From 157bd3816dc91076f48a9b76237b1103733ff296 Mon Sep 17 00:00:00 2001 From: zadam Date: Fri, 18 Oct 2019 21:04:20 +0200 Subject: [PATCH] add hideTabRowForOneTab if missing, fixes #660 --- db/migrations/0147__add_hideTabRowForOneTab_if_missing.sql | 3 +++ src/services/app_info.js | 2 +- src/services/options_init.js | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 db/migrations/0147__add_hideTabRowForOneTab_if_missing.sql diff --git a/db/migrations/0147__add_hideTabRowForOneTab_if_missing.sql b/db/migrations/0147__add_hideTabRowForOneTab_if_missing.sql new file mode 100644 index 000000000..69f6620b0 --- /dev/null +++ b/db/migrations/0147__add_hideTabRowForOneTab_if_missing.sql @@ -0,0 +1,3 @@ +INSERT INTO options (name, value, utcDateCreated, utcDateModified, isSynced) +SELECT 'hideTabRowForOneTab', 'false', '2019-05-01T18:31:00.874Z', '2019-05-01T18:31:00.874Z', 0 +WHERE NOT EXISTS(SELECT 1 FROM options WHERE name = 'hideTabRowForOneTab'); \ No newline at end of file diff --git a/src/services/app_info.js b/src/services/app_info.js index 477fb83c3..e490bf77a 100644 --- a/src/services/app_info.js +++ b/src/services/app_info.js @@ -4,7 +4,7 @@ const build = require('./build'); const packageJson = require('../../package'); const {TRILIUM_DATA_DIR} = require('./data_dir'); -const APP_DB_VERSION = 146; +const APP_DB_VERSION = 147; const SYNC_VERSION = 10; const CLIPPER_PROTOCOL_VERSION = "1.0"; diff --git a/src/services/options_init.js b/src/services/options_init.js index 2ebb2b9de..d9d5251e5 100644 --- a/src/services/options_init.js +++ b/src/services/options_init.js @@ -82,6 +82,8 @@ async function initNotSyncedOptions(initialized, startNotePath = 'root', opts = await optionService.createOption('spellCheckEnabled', 'true', false); await optionService.createOption('spellCheckLanguageCode', 'en-US', false); + + await optionService.createOption('hideTabRowForOneTab', 'false', false); } module.exports = {