From 56b7e3afc417d76060d0951866bd93013c8bc34e Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Wed, 31 Jan 2018 09:51:30 +0100 Subject: [PATCH] Fix upgrade from 1.4.3 to 3.0.0 Signed-off-by: tobiasKaminsky --- .../owncloud/android/providers/FileContentProvider.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/owncloud/android/providers/FileContentProvider.java b/src/main/java/com/owncloud/android/providers/FileContentProvider.java index be7dc382f5..59ec887667 100644 --- a/src/main/java/com/owncloud/android/providers/FileContentProvider.java +++ b/src/main/java/com/owncloud/android/providers/FileContentProvider.java @@ -1629,22 +1629,22 @@ public class FileContentProvider extends ContentProvider { ADD_COLUMN + ProviderTableMeta.FILE_ENCRYPTED_NAME + " TEXT "); } if (!checkIfColumnExists(db, ProviderTableMeta.CAPABILITIES_TABLE_NAME, - ProviderTableMeta.CAPABILITIES_END_TO_END_ENCRYPTION)) { + ProviderTableMeta.CAPABILITIES_END_TO_END_ENCRYPTION) && oldVersion > 20) { db.execSQL(ALTER_TABLE + ProviderTableMeta.CAPABILITIES_TABLE_NAME + ADD_COLUMN + ProviderTableMeta.CAPABILITIES_END_TO_END_ENCRYPTION + " INTEGER "); } if (!checkIfColumnExists(db, ProviderTableMeta.CAPABILITIES_TABLE_NAME, - ProviderTableMeta.CAPABILITIES_SERVER_TEXT_COLOR)) { + ProviderTableMeta.CAPABILITIES_SERVER_TEXT_COLOR) && oldVersion > 20) { db.execSQL(ALTER_TABLE + ProviderTableMeta.CAPABILITIES_TABLE_NAME + ADD_COLUMN + ProviderTableMeta.CAPABILITIES_SERVER_TEXT_COLOR + " TEXT "); } if (!checkIfColumnExists(db, ProviderTableMeta.CAPABILITIES_TABLE_NAME, - ProviderTableMeta.CAPABILITIES_SERVER_ELEMENT_COLOR)) { + ProviderTableMeta.CAPABILITIES_SERVER_ELEMENT_COLOR) && oldVersion > 20) { db.execSQL(ALTER_TABLE + ProviderTableMeta.CAPABILITIES_TABLE_NAME + ADD_COLUMN + ProviderTableMeta.CAPABILITIES_SERVER_ELEMENT_COLOR + " TEXT "); } if (!checkIfColumnExists(db, ProviderTableMeta.FILESYSTEM_TABLE_NAME, - ProviderTableMeta.FILESYSTEM_CRC32)) { + ProviderTableMeta.FILESYSTEM_CRC32) && oldVersion > 20) { try { db.execSQL(ALTER_TABLE + ProviderTableMeta.FILESYSTEM_TABLE_NAME + ADD_COLUMN + ProviderTableMeta.FILESYSTEM_CRC32 + " TEXT ");