Skip to content

Commit

Permalink
AND-17495: Fix crash room database migration from old version
Browse files Browse the repository at this point in the history
(cherry picked from commit 867242c)
  • Loading branch information
lhmega committed Sep 29, 2023
1 parent 88d7b8d commit d4e50d7
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ internal object RoomDatabaseModule {
Room.databaseBuilder(
applicationContext,
MegaDatabase::class.java, MegaDatabaseConstant.DATABASE_NAME
).fallbackToDestructiveMigrationFrom(
*(1..66).toList().toIntArray() // allow destructive migration for version 1 to 66
).addMigrations(*MegaDatabase.MIGRATIONS)
.build().apply {
// this is workaround to make sure room migration run before sqlite database migration
Expand Down

0 comments on commit d4e50d7

Please sign in to comment.