From 15ac81627cd0c8b4bd2810787fc31738270f4c99 Mon Sep 17 00:00:00 2001 From: zadam Date: Thu, 18 Nov 2021 21:52:56 +0100 Subject: [PATCH] DB cleanup migration --- db/migrations/0186__drop_branches_options_utcDateCreated.sql | 2 ++ db/schema.sql | 4 +--- package.json | 2 +- src/services/app_info.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 db/migrations/0186__drop_branches_options_utcDateCreated.sql diff --git a/db/migrations/0186__drop_branches_options_utcDateCreated.sql b/db/migrations/0186__drop_branches_options_utcDateCreated.sql new file mode 100644 index 000000000..b678f64a4 --- /dev/null +++ b/db/migrations/0186__drop_branches_options_utcDateCreated.sql @@ -0,0 +1,2 @@ +ALTER TABLE branches DROP COLUMN utcDateCreated; +ALTER TABLE options DROP COLUMN utcDateCreated; diff --git a/db/schema.sql b/db/schema.sql index 989585170..3a2ed7240 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -23,8 +23,7 @@ CREATE TABLE IF NOT EXISTS "branches" ( `isExpanded` INTEGER NOT NULL DEFAULT 0, `isDeleted` INTEGER NOT NULL DEFAULT 0, `deleteId` TEXT DEFAULT NULL, - `utcDateModified` TEXT NOT NULL, - utcDateCreated TEXT NOT NULL, + `utcDateModified` TEXT NOT NULL PRIMARY KEY(`branchId`)); CREATE TABLE IF NOT EXISTS "notes" ( `noteId` TEXT NOT NULL, @@ -65,7 +64,6 @@ CREATE TABLE IF NOT EXISTS "options" name TEXT not null PRIMARY KEY, value TEXT, isSynced INTEGER default 0 not null, - utcDateCreated TEXT not null, utcDateModified TEXT NOT NULL ); CREATE TABLE IF NOT EXISTS "attributes" diff --git a/package.json b/package.json index 272267bc9..8684f94fd 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ }, "devDependencies": { "cross-env": "7.0.3", - "electron": "16.0.0", + "electron": "16.0.1", "@electron/remote": "2.0.1", "electron-builder": "22.13.1", "electron-packager": "15.4.0", diff --git a/src/services/app_info.js b/src/services/app_info.js index e5317c018..db6a20728 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 = 185; +const APP_DB_VERSION = 186; const SYNC_VERSION = 21; const CLIPPER_PROTOCOL_VERSION = "1.0";