3 ms·
We use Django primarily so data migrations are built in. For complex operations we use plain sql files. Always test on staging with the live data and schema!
by nickserv 7y ago
We use Django primarily so data migrations are built in.
For complex operations we use plain sql files.
Always test on staging with the live data and schema!
- marcc 7y agoAgreed on testing with real data. Even then, sometimes migrations can be brittle when unexpected data is loaded from a new environment. I'm curious how folks who aren't using an ORM handle this. We've used Goose before for schema migrations, and can add .go migrations that handle more complex data-migration tasks. It always feels more brittle, and I wonder if there's a pattern that I'm missing here. Is there a better way for non-ORM users to handle data migrations?
- JamesBarney 7y agoWhat are the issues you are currently running into?