From eab0618cf4b3c6955210a0b8d7286bc042ede7df Mon Sep 17 00:00:00 2001 From: vincent Bourgmayer Date: Tue, 24 May 2022 11:16:54 +0200 Subject: [PATCH] Fix database update error: add missing space in query --- app/src/main/java/foundation/e/drive/database/DbHelper.java | 2 +- .../foundation/e/drive/database/SyncedFileStateContract.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/foundation/e/drive/database/DbHelper.java b/app/src/main/java/foundation/e/drive/database/DbHelper.java index 5f8e822f..0c84a757 100644 --- a/app/src/main/java/foundation/e/drive/database/DbHelper.java +++ b/app/src/main/java/foundation/e/drive/database/DbHelper.java @@ -69,7 +69,7 @@ public final class DbHelper extends SQLiteOpenHelper { db.execSQL(SyncedFileStateContract.UPDATE_SETTINGS_DATA_TO_VERSION_20); } } catch(Exception e) { - Log.e(TAG, toString()); + Log.e(TAG, e.getMessage()); } } diff --git a/app/src/main/java/foundation/e/drive/database/SyncedFileStateContract.java b/app/src/main/java/foundation/e/drive/database/SyncedFileStateContract.java index 6d807687..37bbcfed 100644 --- a/app/src/main/java/foundation/e/drive/database/SyncedFileStateContract.java +++ b/app/src/main/java/foundation/e/drive/database/SyncedFileStateContract.java @@ -65,9 +65,9 @@ class SyncedFileStateContract implements BaseColumns{ //update for version 19 and lower static final String UPDATE_TABLE_TO_VERSION_20 = "ALTER TABLE "+TABLE_NAME+" ADD COLUMN "+SCANNABLE+" INTEGER;"; - static final String UPDATE_MEDIA_DATA_TO_VERSION_20 = "UPDATE "+TABLE_NAME+" SET "+SCANNABLE+" = 3 WHERE" + static final String UPDATE_MEDIA_DATA_TO_VERSION_20 = "UPDATE "+TABLE_NAME+" SET "+SCANNABLE+" = 3 WHERE " + IS_MEDIA_TYPE+" = 1 ;" ; - static final String UPDATE_SETTINGS_DATA_TO_VERSION_20 = "UPDATE "+TABLE_NAME+" SET "+SCANNABLE+" = 2 WHERE" + static final String UPDATE_SETTINGS_DATA_TO_VERSION_20 = "UPDATE "+TABLE_NAME+" SET "+SCANNABLE+" = 2 WHERE " + IS_MEDIA_TYPE+" = 0 ;" ; } -- GitLab