File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -112,14 +112,14 @@ Returned value will be injected as-is to final SQL statement when copying/updati
112
112
Custom code can also be invoked before and after each migration:
113
113
114
114
``` kotlin
115
- @BeforeMigrationRule (version1 = 1 , version2 = 2 )
116
- fun migrate_1_2_before (db : SupportSQLiteDatabase ) {
115
+ @OnMigrationStartRule (version1 = 1 , version2 = 2 )
116
+ fun migrate_1_2_before (db : SupportSQLiteDatabase , version1 : Int , version2 : Int ) {
117
117
val cursor = db.query(" pragma table_info(Object1Dbo)" )
118
118
assert (cursor.count == 1 )
119
119
}
120
120
121
- @AfterMigrationRule (version1 = 1 , version2 = 2 )
122
- fun migrate_1_2_after (db : SupportSQLiteDatabase ) {
121
+ @OnMigrationEndRule (version1 = 1 , version2 = 2 )
122
+ fun migrate_1_2_after (db : SupportSQLiteDatabase , version1 : Int , version2 : Int ) {
123
123
val cursor = db.query(" pragma table_info(Object1Dbo)" )
124
124
assert (cursor.count == 3 )
125
125
}
You can’t perform that action at this time.
0 commit comments