belongs to Maven artifact android.arch.persistence.room:runtime:1.1.0-beta2
RoomDatabase.MigrationContainer
public
static
class
RoomDatabase.MigrationContainer
extends Object
java.lang.Object | |
↳ | android.arch.persistence.room.RoomDatabase.MigrationContainer |
A container to hold migrations. It also allows querying its contents to find migrations between two versions.
Summary
Public constructors | |
---|---|
RoomDatabase.MigrationContainer()
|
Public methods | |
---|---|
void
|
addMigrations(Migration... migrations)
Adds the given migrations to the list of available migrations. |
List<Migration>
|
findMigrationPath(int start, int end)
Finds the list of migrations that should be run to move from |
Inherited methods | |
---|---|
Public constructors
Public methods
addMigrations
void addMigrations (Migration... migrations)
Adds the given migrations to the list of available migrations. If 2 migrations have the same start-end versions, the latter migration overrides the previous one.
Parameters | |
---|---|
migrations |
Migration : List of available migrations.
|
findMigrationPath
List<Migration> findMigrationPath (int start, int end)
Finds the list of migrations that should be run to move from start
version to
end
version.
Parameters | |
---|---|
start |
int : The current database version |
end |
int : The target database version |
Returns | |
---|---|
List<Migration> |
An ordered list of Migration objects that should be run to migrate
between the given versions. If a migration path cannot be found, returns null .
|
Annotations
Classes
Enums
Exceptions