Skip to content

Commit 501f7ca

Browse files
authored
Update README.md
1 parent e1129f3 commit 501f7ca

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ Returned value will be injected as-is to final SQL statement when copying/updati
112112
Custom code can also be invoked before and after each migration:
113113

114114
```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) {
117117
val cursor = db.query("pragma table_info(Object1Dbo)")
118118
assert(cursor.count == 1)
119119
}
120120

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) {
123123
val cursor = db.query("pragma table_info(Object1Dbo)")
124124
assert(cursor.count == 3)
125125
}

0 commit comments

Comments
 (0)