Skip to content

Commit

Permalink
[Tests] add one set for update table migration.
Browse files Browse the repository at this point in the history
  • Loading branch information
agrosner committed Feb 21, 2021
1 parent 04e3e2a commit 9ff4dac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/src/androidTest/java/com/dbflow5/TestDatabase.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ import com.dbflow5.models.SimpleModel
abstract class TestDatabase : DBFlowDatabase() {

@Migration(version = 1, database = TestDatabase::class, priority = 5)
class TestMigration : UpdateTableMigration<SimpleModel>(SimpleModel::class.java)
class TestMigration : UpdateTableMigration<SimpleModel>(SimpleModel::class.java) {
override fun onPreMigrate() {
super.onPreMigrate()
set(SimpleModel_Table.name.eq("Test")).where(SimpleModel_Table.name.eq("Test1"))
}
}

@Migration(version = 1, database = TestDatabase::class, priority = 1)
class SecondMigration : BaseMigration() {
Expand Down

0 comments on commit 9ff4dac

Please sign in to comment.