Very interesting that SQLDelight migration tests d...
# squarelibraries
c
Very interesting that SQLDelight migration tests don't catch missing default values in a migration (ran into a crash at runtime startup) Is it expected that those gradle task tests don't catch missing default values?
n
Did you provide a sample database with populated data to verify the migration? I believe it should catch the constraint violation 🤔
c
nope. i just ran the gradle command to generate the db like the docs instructed. unless i misinterpreted something there 😅
n
I think that's why you didn't get any error, adding a new column without default value is valid if the table is empty ☝️
c
interesting... i guess i should add data to my db and then test migrations that way. lol
@eygraber sorry for the ping, but i know we were talking on github about migrations for sqldelight. seems like youve got a good amount of experience with them. wonder if youve got an opinion on my issue ^
e
I've run into similar issues in the past, but the way I handled it was by manual testing (not the best approach but it works). I avoided using databases with data in it when running the migration verification because it would lead to having multiple databases under test, which as we discussed on GitHub, can cause severe slowdowns.
I suppose an integration test might catch things like that
c
gotcha. okay. learning something new every day!