|
@@ -985,7 +985,23 @@ public class FileContentProvider extends ContentProvider {
|
|
|
}
|
|
|
|
|
|
if (oldVersion < 20 && newVersion >= 20) {
|
|
|
- Log_OC.i(SQL, "Entering in the #20 ADD in onUpgrade");
|
|
|
+ Log_OC.i(SQL, "Adding arbitrary data table");
|
|
|
+ db.beginTransaction();
|
|
|
+ try {
|
|
|
+ createArbitraryData(db);
|
|
|
+ upgraded = true;
|
|
|
+ db.setTransactionSuccessful();
|
|
|
+ } finally {
|
|
|
+ db.endTransaction();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!upgraded) {
|
|
|
+ Log_OC.i(SQL, String.format(Locale.ENGLISH, UPGRADE_VERSION_MSG, oldVersion, newVersion));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (oldVersion < 21 && newVersion >= 21) {
|
|
|
+ Log_OC.i(SQL, "Entering in the #21 ADD in onUpgrade");
|
|
|
db.beginTransaction();
|
|
|
try {
|
|
|
|
|
@@ -994,10 +1010,6 @@ public class FileContentProvider extends ContentProvider {
|
|
|
ADD_COLUMN + ProviderTableMeta.SYNCED_FOLDER_TYPE +
|
|
|
" INTEGER " + " DEFAULT 0");
|
|
|
|
|
|
-
|
|
|
- Log_OC.i(SQL, "Create arbitrary_data table");
|
|
|
- createArbitraryData(db);
|
|
|
-
|
|
|
|
|
|
|
|
|
Log_OC.i(SQL, "Migrate synced_folders records for image/video split");
|