Skip to content

Commit

Permalink
Specified journal mode
Browse files Browse the repository at this point in the history
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] #529
  • Loading branch information
JaniruTEC committed Apr 13, 2024
1 parent 7b78b92 commit 95f65c3
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 95f65c3

Please sign in to comment.