diff --git a/src/main/java/com/owncloud/android/files/services/FileUploader.java b/src/main/java/com/owncloud/android/files/services/FileUploader.java index 1e50f85806..ad61edd662 100644 --- a/src/main/java/com/owncloud/android/files/services/FileUploader.java +++ b/src/main/java/com/owncloud/android/files/services/FileUploader.java @@ -1053,10 +1053,13 @@ public class FileUploader extends Service } + /** + * Ordinal of enumerated constants is important for old data compatibility. + */ public enum NameCollisionPolicy { + RENAME, // Ordinal corresponds to old forceOverwrite = false (0 in database) + OVERWRITE, // Ordinal corresponds to old forceOverwrite = true (1 in database) CANCEL, - RENAME, - OVERWRITE, ASK_USER; public static final NameCollisionPolicy DEFAULT = RENAME; diff --git a/src/main/java/com/owncloud/android/providers/FileContentProvider.java b/src/main/java/com/owncloud/android/providers/FileContentProvider.java index 6959a5c2ad..3fd9a3af48 100644 --- a/src/main/java/com/owncloud/android/providers/FileContentProvider.java +++ b/src/main/java/com/owncloud/android/providers/FileContentProvider.java @@ -2147,7 +2147,7 @@ public class FileContentProvider extends ContentProvider { ProviderTableMeta.UPLOADS_STATUS + ", " + ProviderTableMeta.UPLOADS_LOCAL_BEHAVIOUR + ", " + ProviderTableMeta.UPLOADS_UPLOAD_TIME + ", " + - "force_overwrite" + ", " + + "force_overwrite" + ", " + // See FileUploader.NameCollisionPolicy ProviderTableMeta.UPLOADS_IS_CREATE_REMOTE_FOLDER + ", " + ProviderTableMeta.UPLOADS_UPLOAD_END_TIMESTAMP + ", " + ProviderTableMeta.UPLOADS_LAST_RESULT + ", " +