mirror of https://github.com/M66B/FairEmail.git
Create DB triggers once
This commit is contained in:
parent
8565e53bfc
commit
2228ae9014
|
@ -2384,7 +2384,7 @@ public abstract class DB extends RoomDatabase {
|
||||||
logMigration(startVersion, endVersion);
|
logMigration(startVersion, endVersion);
|
||||||
db.execSQL("DROP TRIGGER IF EXISTS `attachment_insert`");
|
db.execSQL("DROP TRIGGER IF EXISTS `attachment_insert`");
|
||||||
db.execSQL("DROP TRIGGER IF EXISTS `attachment_delete`");
|
db.execSQL("DROP TRIGGER IF EXISTS `attachment_delete`");
|
||||||
createTriggers(db);
|
//createTriggers(db);
|
||||||
}
|
}
|
||||||
}).addMigrations(new Migration(227, 228) {
|
}).addMigrations(new Migration(227, 228) {
|
||||||
@Override
|
@Override
|
||||||
|
@ -2704,21 +2704,21 @@ public abstract class DB extends RoomDatabase {
|
||||||
logMigration(startVersion, endVersion);
|
logMigration(startVersion, endVersion);
|
||||||
db.execSQL("ALTER TABLE `account` ADD COLUMN `last_modified` INTEGER");
|
db.execSQL("ALTER TABLE `account` ADD COLUMN `last_modified` INTEGER");
|
||||||
db.execSQL("ALTER TABLE `identity` ADD COLUMN `last_modified` INTEGER");
|
db.execSQL("ALTER TABLE `identity` ADD COLUMN `last_modified` INTEGER");
|
||||||
createTriggers(db);
|
//createTriggers(db);
|
||||||
}
|
}
|
||||||
}).addMigrations(new Migration(263, 264) {
|
}).addMigrations(new Migration(263, 264) {
|
||||||
@Override
|
@Override
|
||||||
public void migrate(@NonNull SupportSQLiteDatabase db) {
|
public void migrate(@NonNull SupportSQLiteDatabase db) {
|
||||||
logMigration(startVersion, endVersion);
|
logMigration(startVersion, endVersion);
|
||||||
db.execSQL("ALTER TABLE `account` ADD COLUMN `raw_fetch` INTEGER NOT NULL DEFAULT 0");
|
db.execSQL("ALTER TABLE `account` ADD COLUMN `raw_fetch` INTEGER NOT NULL DEFAULT 0");
|
||||||
createTriggers(db);
|
//createTriggers(db);
|
||||||
}
|
}
|
||||||
}).addMigrations(new Migration(264, 265) {
|
}).addMigrations(new Migration(264, 265) {
|
||||||
@Override
|
@Override
|
||||||
public void migrate(@NonNull SupportSQLiteDatabase db) {
|
public void migrate(@NonNull SupportSQLiteDatabase db) {
|
||||||
logMigration(startVersion, endVersion);
|
logMigration(startVersion, endVersion);
|
||||||
db.execSQL("ALTER TABLE `identity` ADD COLUMN `reply_extra_name` INTEGER NOT NULL DEFAULT 0");
|
db.execSQL("ALTER TABLE `identity` ADD COLUMN `reply_extra_name` INTEGER NOT NULL DEFAULT 0");
|
||||||
createTriggers(db);
|
//createTriggers(db);
|
||||||
}
|
}
|
||||||
}).addMigrations(new Migration(265, 266) {
|
}).addMigrations(new Migration(265, 266) {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue