Remove value1...5 columns
I will have to merge in https://github.com/thewca/worldcubeassociation.org/pull/12531 so that not a bunch of unrelated tests fail.
Tasks:
- [x] Rankings by person
- [x] Records/Rankings need access to attempts
- [x] Editing Results
- [x] Change Factory
- [x] CAD tables?
I´m glad we got rid of the 5 subquery query. Takes about 45 seconds on my machine for 3x3. I looked into optimizations, but this is as far as I got after about an hour of work. These will be procomputed for the big filters anyway.
I think I have found a decent solution for showing the result attempts in rankings/records. Basically instead of getting the whole result in the @query we just get the ids. Which we can then use to get Active Record Result objects to serialize.
I had to change course again, because I noticed that there are too many columns in the SQL queries that I need in the Records queries and also doing a Result.find(result_ids) doesn't handle duplicate Records. This solution does produce much less code changes though which is nice.
Are we going to change this to "Remove all references to value1-5", as we discussed a little while ago in the rollout process for this? Or am I thinking of a different PR?