|
|
@ -31,7 +31,7 @@ abstract class AppDatabase : RoomDatabase() { |
|
|
|
.fallbackToDestructiveMigration() |
|
|
|
.fallbackToDestructiveMigration() |
|
|
|
.addCallback(object : Callback() { |
|
|
|
.addCallback(object : Callback() { |
|
|
|
override fun onDestructiveMigration(db: SupportSQLiteDatabase) { |
|
|
|
override fun onDestructiveMigration(db: SupportSQLiteDatabase) { |
|
|
|
GlobalScope.launch { Restore.restore(Backup.defaultPath) } |
|
|
|
GlobalScope.launch { Restore.restore(Backup.backupPath) } |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
.build() |
|
|
|
.build() |
|
|
|