Hello everyone! I'm using SQLDelight v2.0.0 in a K...
# squarelibraries
r
Hello everyone! I'm using SQLDelight v2.0.0 in a Kotlin multiplatform shared library (ios, android, jvm, etc). I'm trying to pre-populate 4 tables with thousands of rows with no luck. Is there a way to populate some tables at "db init time"? I know you can put `INSERT OR REPLACE ...`statements in your .sq files and this works fine for a few number of rows but if I put the inserts in the sqldelight folder, the compiler just can't handle it - I guess it's trying to generate these inserts as Kotlin code. Any ideas on how to do this?
l
i've never done it, but i can imagine you'd having to override the onmigrate callback on kotlin and read from a source and then write to the .sq file that sqldelight is referring to?
r
Not sure. onmigrate callback on what class?