mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
fix failing upgrade on very old version
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
4b9985303b
commit
6f9ac654c5
1 changed files with 5 additions and 3 deletions
|
@ -1757,9 +1757,11 @@ public class FileContentProvider extends ContentProvider {
|
|||
Log_OC.i(SQL, "Entering in the #34 add redirect to external links");
|
||||
db.beginTransaction();
|
||||
try {
|
||||
db.execSQL(ALTER_TABLE + ProviderTableMeta.EXTERNAL_LINKS_TABLE_NAME +
|
||||
ADD_COLUMN + ProviderTableMeta.EXTERNAL_LINKS_REDIRECT + " INTEGER "); // boolean
|
||||
|
||||
if (!checkIfColumnExists(db, ProviderTableMeta.EXTERNAL_LINKS_TABLE_NAME,
|
||||
ProviderTableMeta.EXTERNAL_LINKS_REDIRECT)) {
|
||||
db.execSQL(ALTER_TABLE + ProviderTableMeta.EXTERNAL_LINKS_TABLE_NAME +
|
||||
ADD_COLUMN + ProviderTableMeta.EXTERNAL_LINKS_REDIRECT + " INTEGER "); // boolean
|
||||
}
|
||||
upgraded = true;
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
|
|
Loading…
Reference in a new issue