Skip to content

Commit

Permalink
fix sqlite migration issue on desktop (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
psuzn authored Oct 3, 2023
1 parent dc0773e commit 9c18364
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import app.cash.sqldelight.driver.jdbc.sqlite.JdbcSqliteDriver
import me.sujanpoudel.playdeals.common.Constants
import me.sujanpoudel.playdeals.common.SqliteDatabase

actual fun createSqlDriver(): SqlDriver = JdbcSqliteDriver("jdbc:sqlite:${Constants.DATABASE_NAME}").apply {
SqliteDatabase.Schema.synchronous().create(this)
}
actual fun createSqlDriver(): SqlDriver = JdbcSqliteDriver(
url = "jdbc:sqlite:${Constants.DATABASE_NAME}",
schema = SqliteDatabase.Schema.synchronous(),
migrateEmptySchema = true,
)

0 comments on commit 9c18364

Please sign in to comment.