apollo-kotlin
apollo-kotlin copied to clipboard
"SQL error or missing database (table records already exists)" error when using sqllite cache on JVM
Using following with a JVM application (small main function)
SqlNormalizedCacheFactory("jdbc:sqlite:swapi.db")
It runs fine the first time but on subsequent runs I get SQL error or missing database (table records already exists). I can see swapi.db file created and if I delete that manually then it runs fine again.
Following is example of what I'm running https://github.com/joreilly/StarWars/blob/main/shared/src/jvmMain/kotlin/dev/johnoreilly/starwars/shared/Main.kt
Seems to be related to https://github.com/cashapp/sqldelight/issues/1901
Closing as this was tackled by #4104 (with maybeCreateOrMigrateSchema)