fix failing upgrade on very old version

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
Tobias Kaminsky 2019-01-29 11:24:11 +01:00 committed by tobiasKaminsky
parent 4b9985303b
commit 6f9ac654c5
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7

View file

@ -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 {
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 {