From 60f635160f4142b9f0fbedc3134b62d83b45f4ab Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 17 Sep 2022 09:24:04 +0200 Subject: [PATCH] Fixed DB upgrade in some situations --- app/src/main/java/eu/faircode/email/DB.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/DB.java b/app/src/main/java/eu/faircode/email/DB.java index 9dba2dca65..748a309357 100644 --- a/app/src/main/java/eu/faircode/email/DB.java +++ b/app/src/main/java/eu/faircode/email/DB.java @@ -2447,7 +2447,7 @@ public abstract class DB extends RoomDatabase { public void migrate(@NonNull SupportSQLiteDatabase db) { logMigration(startVersion, endVersion); db.execSQL("ALTER TABLE `folder` ADD COLUMN `inherited_type` TEXT"); - db.execSQL("DROP VIEW `folder_view`"); + db.execSQL("DROP VIEW IF EXISTS `folder_view`"); db.execSQL("CREATE VIEW IF NOT EXISTS `folder_view` AS " + TupleFolderView.query); } }).addMigrations(new Migration(241, 242) {