From: jabarros Date: Mon, 23 Jun 2014 07:17:46 +0000 (+0200) Subject: Add column 'Permissions' to the local files db X-Git-Tag: oc-android-1.7.0_signed~267^2~13 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/0544e3a18d5575cfd34cf5aed60cabaa561cd4b5 Add column 'Permissions' to the local files db --- diff --git a/src/com/owncloud/android/db/ProviderMeta.java b/src/com/owncloud/android/db/ProviderMeta.java index 2101a688..6f9683c3 100644 --- a/src/com/owncloud/android/db/ProviderMeta.java +++ b/src/com/owncloud/android/db/ProviderMeta.java @@ -68,6 +68,7 @@ public class ProviderMeta { public static final String FILE_ETAG = "etag"; public static final String FILE_SHARE_BY_LINK = "share_by_link"; public static final String FILE_PUBLIC_LINK = "public_link"; + public static final String FILE_PERMISSIONS = "permissions"; public static final String FILE_DEFAULT_SORT_ORDER = FILE_NAME + " collate nocase asc"; diff --git a/src/com/owncloud/android/providers/FileContentProvider.java b/src/com/owncloud/android/providers/FileContentProvider.java index c84d66b0..22bcc1e4 100644 --- a/src/com/owncloud/android/providers/FileContentProvider.java +++ b/src/com/owncloud/android/providers/FileContentProvider.java @@ -93,6 +93,8 @@ public class FileContentProvider extends ContentProvider { ProviderTableMeta.FILE_SHARE_BY_LINK); mFileProjectionMap.put(ProviderTableMeta.FILE_PUBLIC_LINK, ProviderTableMeta.FILE_PUBLIC_LINK); + mFileProjectionMap.put(ProviderTableMeta.FILE_PERMISSIONS, + ProviderTableMeta.FILE_PERMISSIONS); } private static final int SINGLE_FILE = 1; @@ -554,7 +556,8 @@ public class FileContentProvider extends ContentProvider { + ProviderTableMeta.FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA + " INTEGER, " + ProviderTableMeta.FILE_ETAG + " TEXT, " + ProviderTableMeta.FILE_SHARE_BY_LINK + " INTEGER, " - + ProviderTableMeta.FILE_PUBLIC_LINK + " TEXT );" + + ProviderTableMeta.FILE_PUBLIC_LINK + " TEXT, " + + ProviderTableMeta.FILE_PERMISSIONS + " TEXT null);" ); // Create table ocshares @@ -656,6 +659,10 @@ public class FileContentProvider extends ContentProvider { " ADD COLUMN " + ProviderTableMeta.FILE_PUBLIC_LINK + " TEXT " + " DEFAULT NULL"); + db .execSQL("ALTER TABLE " + ProviderTableMeta.FILE_TABLE_NAME + + " ADD COLUMN " + ProviderTableMeta.FILE_PERMISSIONS + " TEXT " + + " DEFAULT NULL"); + // Create table ocshares db.execSQL("CREATE TABLE " + ProviderTableMeta.OCSHARES_TABLE_NAME + "(" + ProviderTableMeta._ID + " INTEGER PRIMARY KEY, "