Is there some nice repo out there I can have a loo...
# squarelibraries
g
Is there some nice repo out there I can have a look at that has SQLDelight migrations correctly setup and working for a KMM project? I’ve been reading this official docs and setup my project with the same simple setup without getting it to work. Problem is that my migration file (.sqm) doesn’t seem to recognise the tables defined in my .sq file. So when running the generation tasks I keep an error message like: “No table found with name <tablename>” Been scratching my head over this for half a day now so if someone could point me to a working solution I could have a look at that would be great.
b
I used migration for my library here: https://github.com/BVantur/inspektify/tree/main/inspektify/src/commonMain/sqldelight My migration is removing all the existing data from the table and adding 1 column to the database table. It was a first time for me as well to write migration for my database, so I don’t have a lot of experiences with migrations for sqldelight, but this one worked for me. I didn’t need to do anything additionally to my project besides adding 1.sqm file to it and writting what needs to be done in my migration.
g
Thanks, I’ll take a look
n
Though I guess for you it's not just in the IDE?
g
It could very well be that problem I’m facing as well because at some point I got all the sqldelight gradle tasks to run successfully but I was still unable to build the app in Android Studio. I got it working in Android studio in the most simple setup without having any migration verification tasks running. I’m running the 2.0.2 version of the SqlDelight plugin with Android Studio Koala Feature Drop | 2024.1.2
n
Similar for me, except I'm on Jellyfish. That jogs my memory... I think one of our devs reported issues with SQLDelight and Koala so the rest of us stayed on Jellyfish