From 95f65c3ae30ca6e7409385e8b50fc3101aac0e96 Mon Sep 17 00:00:00 2001 From: JaniruTEC <52893617+JaniruTEC@users.noreply.github.com> Date: Tue, 12 Mar 2024 21:50:33 +0100 Subject: [PATCH] Specified journal mode Room is designed to choose the journal mode itself if none is specified. greenDAO's journal mode ("TRUNCATE") will stay for now because the journal mode has influence on the behavior caused by issue #529 [1] and because changing the journal mode complicates the migration further. This can still be changed later. *This commit is related to issue #529 [1]* [1] https://github.com/cryptomator/android/issues/529 --- data/src/main/java/org/cryptomator/data/db/DatabaseModule.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/data/src/main/java/org/cryptomator/data/db/DatabaseModule.kt b/data/src/main/java/org/cryptomator/data/db/DatabaseModule.kt index b4288ee8d..b96c03be0 100644 --- a/data/src/main/java/org/cryptomator/data/db/DatabaseModule.kt +++ b/data/src/main/java/org/cryptomator/data/db/DatabaseModule.kt @@ -51,6 +51,7 @@ class DatabaseModule { .addMigrations(*migrations) // .addCallback(DatabaseCallback) // .openHelperFactory(DatabaseOpenHelperFactory()) // + .setJournalMode(RoomDatabase.JournalMode.TRUNCATE) // .build() //Fails if no migration is found (especially when downgrading) .also { // //Migrations are only triggered once the database is used for the first time.