Recently started working on a KMM project, so expl...
# squarelibraries
s
Recently started working on a KMM project, so exploring SQLdelight but faced no table found issue, the setup is working fine if i try to read an existing table but not a new one SO community doesn't have much info about this issue, can anyone help?
s
That sounds like a migration issue. Is this happening on all platforms?
s
shouldn't be migration, as the table exists already via room in existing app, trying to replace the whole thing with KMM library which is able to read the existing table via sqldelight but not able to create a new one have only tested on android yet
well yes, migration in a way, from room to sqldelight
s
as the table exists already
but not able to create a new one
hmmm, i don't think i follow, aren't these two statements contradictory?
s
so there's already a table "cache" in the app (currently in room, no kmm), which i'm able to read via this new KMM module that is using sqldelight but i am also going to create a new table via this KMM module only, which is throwing me errors on runtime, i hope i was able to clear the doubt 😅
s
am also going to create a new table via this KMM module only
got it. what does your migration look like for this new table?
s
do we need a migration (.sqm) for a new table as well? i thought create table queries gonna execute on db initialization
s
yes, database migrations are always needed in SQL if you make schema changes. room was probably performing it automatically for you if you were using
2.4.0-alpha01
or above.
s
got it, thanks for the help, will try it out 🙌