https://kotlinlang.org logo
#squarelibraries
Title
# squarelibraries
c

Colton Idle

12/13/2023, 1:24 PM
Still new-ish to sqldelight and I have to perform my first migration (just need to add a new column and backfill the existing data by adding an empty string to that column) One thing I want to do is test the migration. With room I used the docs here: https://developer.android.com/training/data-storage/room/migrating-db-versions#test I'm looking in the docs for sqdelight for something similar but I haven't really come across anything. am i missing something in front of me here, or is the gist of it this paragraph right here?
j

jw

12/13/2023, 1:27 PM
That's it. Pull version 1 and add 2.sqm and it'll automatically be tested
K 1
c

Colton Idle

12/18/2023, 8:48 PM
for future people, the steps were 1. pull version 1 of the .db (before you do any migration stuff) 2. update your table/columns.etc, and write migration in 1.sqm (not 2.sqm!!!) 3. run the migration test gradle script
2 Views