HomeSort by relevance Sort by last modified time
    Searched refs:Migration (Results 1 - 11 of 11) sorted by null

  /frameworks/support/room/runtime/src/main/java/android/arch/persistence/room/migration/
Migration.java 17 package android.arch.persistence.room.migration;
22 * Base class for a database migration.
24 * Each migration can move between 2 versions that are defined by {@link #startVersion} and
27 * A migration can handle more than 1 version (e.g. if you have a faster path to choose when
29 * 3 and latest version is >= 5, Room will use the migration object that can migrate from
34 * versions, you should still provide a Migration object to the builder.
36 public abstract class Migration {
41 * Creates a new migration between {@code startVersion} and {@code endVersion}.
44 * @param endVersion The end version of the database after this migration is applied.
46 public Migration(int startVersion, int endVersion)
    [all...]
  /frameworks/support/room/runtime/src/test/java/android/arch/persistence/room/
BuilderTest.java 31 import android.arch.persistence.room.migration.Migration;
68 public void migration() { method in class:BuilderTest
69 Migration m1 = new EmptyMigration(0, 1);
70 Migration m2 = new EmptyMigration(1, 2);
78 assertThat(migrations.findMigrationPath(2, 0), CoreMatchers.<List<Migration>>nullValue());
79 assertThat(migrations.findMigrationPath(0, 3), CoreMatchers.<List<Migration>>nullValue());
84 Migration m1 = new EmptyMigration(0, 1);
85 Migration m2 = new EmptyMigration(1, 2);
86 Migration m3 = new EmptyMigration(0, 1)
    [all...]
  /frameworks/support/room/runtime/src/main/java/android/arch/persistence/room/
RoomDatabase.java 26 import android.arch.persistence.room.migration.Migration;
342 * Adds a migration to the builder.
344 * Each Migration has a start and end versions and Room runs these migrations to bring the
347 * If a migration item is missing between current version and the latest version, Room
349 * you should still provide a Migration object to the builder.
351 * A migration can handle more than 1 version (e.g. if you have a faster path to choose when
353 * 3 and latest version is &gt;= 5, Room will use the migration object that can migrate from
356 * @param migrations The migration object that can modify the database and to the necessary
360 public Builder<T> addMigrations(Migration... migrations)
    [all...]
RoomOpenHelper.java 22 import android.arch.persistence.room.migration.Migration;
69 List<Migration> migrations = mConfiguration.migrationContainer.findMigrationPath(
72 for (Migration migration : migrations) {
73 migration.migrate(db);
82 throw new IllegalStateException("A migration from " + oldVersion + " to "
83 + newVersion + " is necessary. Please provide a Migration in the builder or call"
154 * Called after a migration run to validate database integrity.
  /frameworks/support/room/integration-tests/testapp/src/androidTest/java/android/arch/persistence/room/integration/testapp/migration/
MigrationTest.java 17 package android.arch.persistence.room.integration.testapp.migration;
28 import android.arch.persistence.room.migration.Migration;
50 private static final String TEST_DB = "migration-test";
201 7, false, new Migration(6, 7) {
213 assertThat(throwable.getMessage(), containsString("Migration failed"));
267 assertThat(throwable.getMessage(), containsString("Migration failed"));
270 private static final Migration MIGRATION_1_2 = new Migration(1, 2) {
279 private static final Migration MIGRATION_2_3 = new Migration(2, 3)
    [all...]
  /frameworks/support/room/integration-tests/kotlintestapp/src/androidTest/java/android/arch/persistence/room/integration/kotlintestapp/migration/
MigrationKotlinTest.kt 17 package android.arch.persistence.room.integration.kotlintestapp.migration
22 import android.arch.persistence.room.migration.Migration
46 val TEST_DB = "migration-test"
206 7, false, object : Migration(6, 7) {
218 assertThat<String>(throwable!!.message, containsString("Migration failed"))
244 assertThat<String>(throwable!!.message, containsString("Migration failed"))
248 internal val MIGRATION_1_2: Migration = object : Migration(1, 2) {
255 internal val MIGRATION_2_3: Migration = object : Migration(2, 3)
    [all...]
  /frameworks/base/docs/
__DEPRECATED__DO_NOT_EDIT__.txt 4 of 12/2016. Migration of content was completed on 10/16/2016.
  /frameworks/base/docs/html/
__DEPRECATED__DO_NOT_EDIT__.txt 4 of 12/2016. Migration of content was completed on 10/16/2016.
  /external/autotest/database/
migrate_unittest.py 17 Dummy migration class that records all migrations done in a class
133 migration = migrate.Migration('name', 1, migration_module)
134 migration.migrate_up(self.manager)
135 migration.migrate_down(self.manager)
migrate.py 20 class Migration(object):
21 """Represents a database migration."""
35 """Instantiates a Migration from a file.
37 @param filename: Name of a migration file.
39 @return An instantiated Migration object.
67 """Performs an up migration (to a newer version).
76 """Performs a down migration (to an older version).
93 # A boolean, this will only be set to True if this migration should be
145 """Checks whether the migration table exists."""
156 """Creates the migration table.""
    [all...]
  /frameworks/support/room/testing/src/main/java/android/arch/persistence/room/testing/
MigrationTestHelper.java 27 import android.arch.persistence.room.migration.Migration;
28 import android.arch.persistence.room.migration.bundle.DatabaseBundle;
29 import android.arch.persistence.room.migration.bundle.EntityBundle;
30 import android.arch.persistence.room.migration.bundle.FieldBundle;
31 import android.arch.persistence.room.migration.bundle.ForeignKeyBundle;
32 import android.arch.persistence.room.migration.bundle.SchemaBundle;
86 * Creates a new migration helper. It uses the Instrumentation context to load the schema
97 * Creates a new migration helper. It uses the Instrumentation context to load the schema
159 * After the migration, the method validates the database schema to ensure that migratio
    [all...]

Completed in 240 milliseconds