Fixed
Status Update
Comments
yb...@google.com <yb...@google.com>
sh...@google.com <sh...@google.com>
sh...@google.com <sh...@google.com> #2
since these are in public API (:/) we need to do this in 1.2
Description
Version used: 1.0.0-alpha9
Devices/Android versions reproduced on: all
When converting a legacy app over to Room, there exists cases where we really need to do destructive migrations. However, I don't want to use fallbackToDestructiveMigration() as I really don't want to default to destructive migrations for future revisions.
It would be nice if I could do something like
addMigration(
new DestructiveMigration(1),
new DestructiveMigration(2),
MIGRATION_3_4);
Where new DestructiveMigration would migrate from 1 to the current database version, destroying and recreating everything. This would allow us to upgrade those users as if they were just using our app from the start.
Note that we can't have endVersion other than the current version as we don't know what the database looked like for any other endVersion to know what tables we need to create.