Merge pull request #5267 from nextcloud/devDBupdate

Fix duplicated rich_workspace in dev version
This commit is contained in:
Andy Scherzinger 2020-01-21 16:01:07 +01:00 committed by GitHub
commit fc8a5dd43e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2089,9 +2089,11 @@ public class FileContentProvider extends ContentProvider {
Log_OC.i(SQL, "Entering in the #53 add rich workspace to file table"); Log_OC.i(SQL, "Entering in the #53 add rich workspace to file table");
db.beginTransaction(); db.beginTransaction();
try { try {
db.execSQL(ALTER_TABLE + ProviderTableMeta.FILE_TABLE_NAME + if (!checkIfColumnExists(db, ProviderTableMeta.FILE_TABLE_NAME,
ADD_COLUMN + ProviderTableMeta.FILE_RICH_WORKSPACE + " TEXT "); ProviderTableMeta.FILE_RICH_WORKSPACE)) {
db.execSQL(ALTER_TABLE + ProviderTableMeta.FILE_TABLE_NAME +
ADD_COLUMN + ProviderTableMeta.FILE_RICH_WORKSPACE + " TEXT ");
}
upgraded = true; upgraded = true;
db.setTransactionSuccessful(); db.setTransactionSuccessful();
} finally { } finally {