mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 05:44:51 +02:00
Refactoring
This commit is contained in:
@@ -489,13 +489,8 @@ public abstract class DB extends RoomDatabase {
|
||||
Log.i("Get PRAGMA " + pragma + "=<?>");
|
||||
}
|
||||
|
||||
if (BuildConfig.DEBUG) {
|
||||
db.execSQL("DROP TRIGGER IF EXISTS `attachment_insert`");
|
||||
db.execSQL("DROP TRIGGER IF EXISTS `attachment_delete`");
|
||||
|
||||
db.execSQL("DROP TRIGGER IF EXISTS `account_update`");
|
||||
db.execSQL("DROP TRIGGER IF EXISTS `identity_update`");
|
||||
}
|
||||
if (BuildConfig.DEBUG && false)
|
||||
dropTriggers(db);
|
||||
|
||||
createTriggers(db);
|
||||
}
|
||||
@@ -528,6 +523,14 @@ public abstract class DB extends RoomDatabase {
|
||||
}
|
||||
}
|
||||
|
||||
private static void dropTriggers(@NonNull SupportSQLiteDatabase db) {
|
||||
db.execSQL("DROP TRIGGER IF EXISTS `attachment_insert`");
|
||||
db.execSQL("DROP TRIGGER IF EXISTS `attachment_delete`");
|
||||
|
||||
db.execSQL("DROP TRIGGER IF EXISTS `account_update`");
|
||||
db.execSQL("DROP TRIGGER IF EXISTS `identity_update`");
|
||||
}
|
||||
|
||||
private static void createTriggers(@NonNull SupportSQLiteDatabase db) {
|
||||
List<String> image = new ArrayList<>();
|
||||
for (String img : ImageHelper.IMAGE_TYPES)
|
||||
|
||||
Reference in New Issue
Block a user