Skip to content

Commit 1a88d2a

Browse files
committed
Add migrations for LoanWithAssociations & Timeline entities
1 parent 8d82876 commit 1a88d2a

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

core/database/src/androidMain/kotlin/com/mifos/room/MifosDatabase.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010
package com.mifos.room
1111

12+
import androidx.room.AutoMigration
1213
import androidx.room.Database
1314
import androidx.room.RoomDatabase
1415
import androidx.room.TypeConverters
@@ -151,7 +152,9 @@ import com.mifos.room.typeconverters.CustomTypeConverters
151152
],
152153
version = MifosDatabase.VERSION,
153154
exportSchema = false,
154-
autoMigrations = [],
155+
autoMigrations = [
156+
AutoMigration(from = 1, to = 2),
157+
],
155158
)
156159
@TypeConverters(
157160
CustomTypeConverters::class,
@@ -169,6 +172,6 @@ actual abstract class MifosDatabase : RoomDatabase() {
169172
actual abstract val surveyDao: SurveyDao
170173

171174
companion object {
172-
const val VERSION = 1
175+
const val VERSION = 2
173176
}
174177
}

core/database/src/desktopMain/kotlin/com/mifos/room/MifosDatabase.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010
package com.mifos.room
1111

12+
import androidx.room.AutoMigration
1213
import androidx.room.Database
1314
import androidx.room.RoomDatabase
1415
import androidx.room.TypeConverters
@@ -151,7 +152,7 @@ import com.mifos.room.typeconverters.CustomTypeConverters
151152
],
152153
version = MifosDatabase.VERSION,
153154
exportSchema = false,
154-
autoMigrations = [],
155+
autoMigrations = [AutoMigration(from = 1, to = 2)],
155156
)
156157
@TypeConverters(
157158
CustomTypeConverters::class,
@@ -169,6 +170,6 @@ actual abstract class MifosDatabase : RoomDatabase() {
169170
actual abstract val surveyDao: SurveyDao
170171

171172
companion object {
172-
const val VERSION = 1
173+
const val VERSION = 2
173174
}
174175
}

core/database/src/nativeMain/kotlin/com/mifos/room/MifosDatabase.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010
package com.mifos.room
1111

12+
import androidx.room.AutoMigration
1213
import androidx.room.ConstructedBy
1314
import androidx.room.Database
1415
import androidx.room.RoomDatabase
@@ -153,7 +154,7 @@ import com.mifos.room.typeconverters.CustomTypeConverters
153154
],
154155
version = MifosDatabase.VERSION,
155156
exportSchema = false,
156-
autoMigrations = [],
157+
autoMigrations = [AutoMigration(from = 1, to = 2)],
157158
)
158159
@TypeConverters(
159160
CustomTypeConverters::class,
@@ -172,7 +173,7 @@ actual abstract class MifosDatabase : RoomDatabase() {
172173
actual abstract val surveyDao: SurveyDao
173174

174175
companion object {
175-
const val VERSION = 1
176+
const val VERSION = 2
176177
}
177178
}
178179

0 commit comments

Comments
 (0)