Conversation
zachmargolis
left a comment
There was a problem hiding this comment.
LGTM! should we also add these to ignored_columns so that we get errors if any code uses them?
changelog: Internal, Optimization, Stop updating unused columns in database
0cf2651 to
d4bfcb5
Compare
Yep, great call, added that |
Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
orenyk
left a comment
There was a problem hiding this comment.
Question - are we going to also remove the columns from the DB? Otherwise looks good to me (assuming all tests pass and whatnot)
Yep, that's the plan. We need to do it in two steps though so that the deploy doesn't drop the columns while the old servers are still trying to write to them. |
|
@mitchellhenke 🤦 I should have thought of that, thanks! |
We have 5 columns created for Devise's
:trackablemodule:sign_in_countcurrent_sign_in_atlast_sign_in_atcurrent_sign_in_iplast_sign_in_ipWe currently update these columns, but do not reference them in code or use them for any reports, so we can safely stop writing them and then later drop them.
This goes wayyyyyyyyy back to @jgrevich's #2 (which will be celebrating it's 6th birthday next week!), but I'm not sure when we may have stopped using these columns.