Browse Source

change crc32 to v28

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 7 years ago
parent
commit
eef69ea4ce

+ 10 - 9
src/main/java/com/owncloud/android/providers/FileContentProvider.java

@@ -1549,13 +1549,12 @@ public class FileContentProvider extends ContentProvider {
                 Log_OC.i(SQL, String.format(Locale.ENGLISH, UPGRADE_VERSION_MSG, oldVersion, newVersion));
             }
 
-            if (oldVersion < 26 && newVersion >= 26) {
-                Log_OC.i(SQL, "Entering in the #26 Adding CRC32 column to filesystem table");
+            if (oldVersion < 27 && newVersion >= 27) {
+                Log_OC.i(SQL, "Entering in the #27 Adding token to ocUpload");
                 db.beginTransaction();
                 try {
-                    db.execSQL(ALTER_TABLE + ProviderTableMeta.FILESYSTEM_TABLE_NAME +
-                            ADD_COLUMN + ProviderTableMeta.FILESYSTEM_CRC32 + " TEXT ");
-
+                    db.execSQL(ALTER_TABLE + ProviderTableMeta.UPLOADS_TABLE_NAME +
+                            ADD_COLUMN + ProviderTableMeta.UPLOADS_FOLDER_UNLOCK_TOKEN + " TEXT ");
                     upgraded = true;
                     db.setTransactionSuccessful();
                 } finally {
@@ -1567,12 +1566,13 @@ public class FileContentProvider extends ContentProvider {
                 Log_OC.i(SQL, String.format(Locale.ENGLISH, UPGRADE_VERSION_MSG, oldVersion, newVersion));
             }
 
-            if (oldVersion < 27 && newVersion >= 27) {
-                Log_OC.i(SQL, "Entering in the #27 Adding token to ocUpload");
+            if (oldVersion < 28 && newVersion >= 28) {
+                Log_OC.i(SQL, "Entering in the #28 Adding CRC32 column to filesystem table");
                 db.beginTransaction();
                 try {
-                    db.execSQL(ALTER_TABLE + ProviderTableMeta.UPLOADS_TABLE_NAME +
-                            ADD_COLUMN + ProviderTableMeta.UPLOADS_FOLDER_UNLOCK_TOKEN + " TEXT ");
+                    db.execSQL(ALTER_TABLE + ProviderTableMeta.FILESYSTEM_TABLE_NAME +
+                            ADD_COLUMN + ProviderTableMeta.FILESYSTEM_CRC32 + " TEXT ");
+
                     upgraded = true;
                     db.setTransactionSuccessful();
                 } finally {
@@ -1583,6 +1583,7 @@ public class FileContentProvider extends ContentProvider {
             if (!upgraded) {
                 Log_OC.i(SQL, String.format(Locale.ENGLISH, UPGRADE_VERSION_MSG, oldVersion, newVersion));
             }
+
         }
 
         @Override