apollo-kotlin icon indicating copy to clipboard operation
apollo-kotlin copied to clipboard

"SQL error or missing database (table records already exists)" error when using sqllite cache on JVM

Open joreilly opened this issue 3 years ago • 2 comments

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.

joreilly avatar Dec 28 '21 23:12 joreilly

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

joreilly avatar Dec 28 '21 23:12 joreilly

Seems to be related to https://github.com/cashapp/sqldelight/issues/1901

BoD avatar Jan 04 '22 08:01 BoD

Closing as this was tackled by #4104 (with maybeCreateOrMigrateSchema)

BoD avatar Nov 03 '22 14:11 BoD