[2315] Add migration to set decline by default #9875
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
This is the second of three PRs to correct this bug related to decline_by_default. See the first PR here for context and to see what has been done already.
Changes proposed in this pull request
Job will set data to nil for about 40,109 applications. See blazer query.
I've tested it locally with 4000 application choices and it took 6.506ms, so I think this update will only take 65ms, no time at all.
Guidance to review
Will this touch 40,000 records? Am going to cause another BIG TOUCH incident? I don't think so because it doesn't execute active record callbacks, but if someone knows better, please speak up!
https://apidock.com/rails/ActiveRecord/Relation/update_all
Things to check