5 ms·
Typically though, restoring from backup is a dicey proposition. If a schema migration causes issues down the line, you're likely to have production data that ne
by Joeri 12y ago
Typically though, restoring from backup is a dicey proposition. If a schema migration causes issues down the line, you're likely to have production data that needs to be kept. E.g. a room reservation system can't just drop two days of bookings on the floor because some financial accounting table was improperly migrated. Partial restores are also difficult if you've drunk deep from the relational chalice.
On the other hand, if the upgrade was broken, it's unlikely the downgrade will work. The situation where the downgrade works is when you don't need it. On the database i work on we fix bad upgrades that weren't discovered immediately by layering another upgrade over it.
- collyw 12y agoI am on MySQL and have the binary logging enabled, so theoretically I can restore a backup, then replay the commands to a point in time. I have got a job running every night to restore a copy to exactly one week ago to test it. Seems to work (Though sounds like I am operating at a smaller scale than you South for Django has the whole migrations things stored for me, but I never see myself wanting to use it for backwards migrations.