mirror of https://github.com/M66B/FairEmail.git
Refactoring
This commit is contained in:
parent
0a5cfdfbc9
commit
8565e53bfc
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue