|
|
|
|
|
by fulafel
886 days ago
|
|
DB schema migration script frameworks (at least in Python, Ruby & Java lands) do typically support both upgrade and downgrade directions. People skip implementing and testing the downgrade side if the development model doesn't need it but the problem of what happens to the data is controlled by what you put in the "down" migration script. I'd guess if you can't throw the data away, you won't do a down migration, you'll do an up migration that changes the db to save that data in your preferred way before undoing or reworking the previous schema change. |
|
They do, and in every shop I've ever been in these are considered a trap precisely because they don't consider data loss.
Always roll forward. If you have to change migration history, restore a backup and lament past you's hubris.