Skip to content

Commit

Permalink
Resolve native driver factory type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
msasikanth committed Aug 4, 2023
1 parent dfcbc07 commit e3ef4da
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ actual class DriverFactory {
return NativeSqliteDriver(
DatabaseConfiguration(
name = DB_NAME,
version = ReaderDatabase.Schema.version,
version = ReaderDatabase.Schema.version.toInt(),
create = { connection -> wrapConnection(connection) { ReaderDatabase.Schema.create(it) } },
upgrade = { connection, oldVersion, newVersion ->
wrapConnection(connection) { ReaderDatabase.Schema.migrate(it, oldVersion, newVersion) }
wrapConnection(connection) {
ReaderDatabase.Schema.migrate(it, oldVersion.toLong(), newVersion.toLong())
}
},
extendedConfig = DatabaseConfiguration.Extended(foreignKeyConstraints = true)
)
Expand Down

0 comments on commit e3ef4da

Please sign in to comment.