top | item 24075533

(no title)

zumachase | 5 years ago

We've got a core product running on Django, and one thing the author doesn't mention is testing migrations. The migration system is wonderful, except for the difficulty in testing migrations. There's no sane/official way to do this. And it's such an important thing that I don't get why the Django crew haven't tackled it.

discuss

order

ensignavenger|5 years ago

What sort of proposal would you put forth? I generally install one of my production backups onto a staging server (secured appropriately for production data), and run the migrations against it to test.

jordic|5 years ago

That's not the intention on the code, I thought he is talking around writing a migration and a test that ensures the data migration is correctly applied

dvarrazzo|5 years ago

My strategy here is to have a staging server where migrations are applied before they can hit production.

As someone else pointed out, migration without CI can be dangerous and difficult to coordinate with deployment.

zumachase|5 years ago

This is what we do but it's too manual for my taste.