Check the migration file which adds the location t...
# squarelibraries
a
Check the migration file which adds the location table and see if it’s failing
z
Hmm I don’t have any migration file. Do I need one? This doesn’t really makes sense to have such file as I don’t change anything related to the DB itself, just updated version of sqldelight 🤔 Could you explain a little bit more about this? The documentation related to migrations (for KMP) doesn’t say much about it 😅
@alec You sure there isn’t any bug related to this? We tried everything already (with 1.4.3 and 1.4.4) but still same result
a
If you can create a repro project please open an issue on github
z
@alec Just for the record, the issue was with driver setup for iOS platform:
Copy code
actual fun getDriver(): SqlDriver = NativeSqliteDriver(
            DatabaseConfiguration(
                    name = "",
                    version = version,
                    create = { connection ->
                        wrapConnection(connection) { DB.Schema.create(it) }
                    },
                    upgrade = { connection, oldVersion, newVersion ->
                        wrapConnection(connection) { DB.Schema.migrate(it, oldVersion, newVersion) }
                    },
                    inMemory = true
            )
We passed an empty string as name. It was working fine with previous version but apparently since 1.4 it causes error. You shouldn’t allow empty string for the name if it’s not working. The error message in this case is a little bit misleading. Also providing the name fixed the issue
no table found
but seems like
inMemory = true
behaviour also has changed. DB is not cleaned automatically between different tests, is that expected now?
a
thats getting into SQLiter territory now, not SQLDelight cc @kpgalligan
k
Don’t know. Will need to look into it. I am not aware of anything changing, but…