|
|
|
|
|
by johbjo
1834 days ago
|
|
It would have to be in steps: Add Xn+1: create new views without column.
When no Xn clients remain: drop column from tables and drop schema Xn. The point as I see it is to not break live client connections which expect the column to exist. |
|
You can use views to make migrations that were previously tricky zero-downtime.
If that's not the case, then I mist've read the article wrong!
Edit: although when I think of it - if you want to eventually materialize old migration schemas into the base schema, you need to do the rename, too. Which is not zero-downtime because of new migration schemas that do the renaming automatically. Meaning changing views' definition, meaning lots of locking.
So, you still need maintenance windows to merge all the changes. Just not on every change. Otherwise the base schema will then eventually be completely out of sync and contain tons of old, unused columns.