mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
db v20 is also on master, v21 now has to be used so development doesn't break
This commit is contained in:
parent
20b05e7ce2
commit
b02d4378fa
1 changed files with 17 additions and 5 deletions
|
@ -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 {
|
||||
// add type column default being CUSTOM (0)
|
||||
|
@ -994,10 +1010,6 @@ public class FileContentProvider extends ContentProvider {
|
|||
ADD_COLUMN + ProviderTableMeta.SYNCED_FOLDER_TYPE +
|
||||
" INTEGER " + " DEFAULT 0");
|
||||
|
||||
// create arbitrary data table
|
||||
Log_OC.i(SQL, "Create arbitrary_data table");
|
||||
createArbitraryData(db);
|
||||
|
||||
// magic to split out existing synced folders in two when needed
|
||||
// otherwise, we migrate them to their proper type (image or video)
|
||||
Log_OC.i(SQL, "Migrate synced_folders records for image/video split");
|
||||
|
|
Loading…
Reference in a new issue