How to seed between migrations, to test your new migrations work on existing data?
In prod, we already have a bunch of data, and some migrations have run. Now I want to run migrations which work on existing data (e.g. convert a pk from int to uuid). I'd like to test this carefully, with automated tests. I was hoping I could add some seed data before running any new migrations, to check the new migrations work correctly on existing data. However, it seems seed data is only run after all the migrations have completed.
Anyone have any advice on how I can robustly test a new migration that needs existing data?
2 Replies