Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Version used: 1.0.0-alpha3
1) Create an entity with @PrimaryKey(autoGenerate = true)
2) Test a migration with MigrationTestHelper
MigrationTestHelper.runMigrationsAndValidate passes if validateDroppedTables is false, but fails if validateDroppedTables is true.
MigrationTestHelper.validateMigration excludes android_metadata and room_master_table but doesn't exclude sqlite_sequence (where sqlite stores the largest row ID) when querying sqlite_master for application-defined tables.
java.lang.IllegalStateException: Migration failed. Unexpected table sqlite_sequence
at android.arch.persistence.room.testing.MigrationTestHelper$MigratingDelegate.validateMigration(MigrationTestHelper.java:353)
at android.arch.persistence.room.RoomOpenHelper.onUpgrade(RoomOpenHelper.java:73)
at android.arch.persistence.db.framework.FrameworkSQLiteOpenHelper$1.onUpgrade(FrameworkSQLiteOpenHelper.java:49)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:299)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:194)
at android.arch.persistence.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(FrameworkSQLiteOpenHelper.java:106)
at android.arch.persistence.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.java:82)
at android.arch.persistence.room.testing.MigrationTestHelper.openDatabase(MigrationTestHelper.java:189)
at android.arch.persistence.room.testing.MigrationTestHelper.runMigrationsAndValidate(MigrationTestHelper.java:177)
at io.pivotal.androidarchitecturedemo.room.migrations.MigrateV1Test.migrate1To2(MigrateV1Test.java:51)