4 ms·
Before dropping the old data, what is the simplest way of making sure it's not used? As the article says "this is hard to roll back". Is it as simple as keepi
by alkonaut 5y ago
Before dropping the old data, what is the simplest way of making sure it's not used? As the article says "this is hard to roll back".
Is it as simple as keeping the data around, but e.g. renaming columns to "columnname_deprecated_yyyy_MM_dd" and then in the unlikely event that something starts failing, you can at least rename it back to the old name while putting out that fire?
- athenot 5y agoThat's a good precaution. Another one might be to log queries and check for use of that old column. 2 caveats: (1) ensure this logging doesn't cause performance bottleneck and (2) this might not catch queries that use globs (ie. "select * from ..."). For (1) you can do this one only some of your instances of your DB cluster and (2), try to always use explicit column references.
- alkonaut 5y agoAre there any databases that support per-column security so you can fail reads (including globs)?
- mleonhard 5y agoThis works for API field deprecation, too.