Hacker News new | past | comments | ask | show | jobs | submit login

Django migrations solve this by asking for a dependency graph, and verifying that there's only one leaf node, so to speak.

So if you merge in separate scripts you will need to linearize by hand.

On top of this, there's a table within the database tracking which migrations are run, so you don't accidentally rerun these for example.




What will work in a lot of circumstances is to put your custom scripts into empty Django migrations. Then they'll get run as needed. If you're feeling fancy you can write the backwards script as well.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: