-
Notifications
You must be signed in to change notification settings - Fork 197
Closed
Labels
META: good first issueSmall/easy change which is a good introduction to working in the WCA repoSmall/easy change which is a good introduction to working in the WCA repo
Description
Our current list of events:
mysql> select * from Events;
+--------+----------------------------------------+------+--------+------------------------------+
| id | name | rank | format | cellName |
+--------+----------------------------------------+------+--------+------------------------------+
| 333 | Rubik's Cube | 10 | time | Rubik's Cube |
| 444 | 4x4 Cube | 20 | time | 4x4 Cube |
| 555 | 5x5 Cube | 30 | time | 5x5 Cube |
| 222 | 2x2 Cube | 40 | time | 2x2 Cube |
| 333bf | Rubik's Cube: Blindfolded | 50 | time | 3x3 blindfolded |
| 333oh | Rubik's Cube: One-handed | 60 | time | 3x3 one-handed |
| 333fm | Rubik's Cube: Fewest moves | 70 | number | 3x3 fewest moves |
| 333ft | Rubik's Cube: With feet | 80 | time | 3x3 with feet |
| minx | Megaminx | 110 | time | Megaminx |
| pyram | Pyraminx | 120 | time | Pyraminx |
| sq1 | Square-1 | 130 | time | Square-1 |
| clock | Rubik's Clock | 140 | time | Rubik's Clock |
| skewb | Skewb | 150 | time | Skewb |
| 666 | 6x6 Cube | 200 | time | 6x6 Cube |
| 777 | 7x7 Cube | 210 | time | 7x7 Cube |
| 444bf | 4x4 Cube: Blindfolded | 500 | time | 4x4 blindfolded |
| 555bf | 5x5 Cube: Blindfolded | 510 | time | 5x5 blindfolded |
| 333mbf | Rubik's Cube: Multiple Blindfolded | 520 | multi | 3x3 multi blind |
| magic | Rubik's Magic | 997 | time | Rubik's Magic |
| mmagic | Master Magic | 998 | time | Master Magic |
| 333mbo | Rubik's Cube: Multi blind old style | 999 | multi | 3x3 multi blind old |
| 333ni | Rubik's Cube: No inspection | 1010 | time | 3x3 no inspection |
| 333sbf | Rubik's Cube: Speed Blindfolded | 1020 | time | 3x3 speed blindfolded |
| 333r3 | Rubik's Cube: 3 in a row | 1030 | time | 3x3 3 in a row |
| 333ts | Rubik's Cube: Team solving | 1035 | time | 3x3 team solving |
| 333bts | Rubik's Cube: Blindfolded team solving | 1040 | time | 3x3 blindfolded team solving |
| 222bf | 2x2 Cube: Blindfolded | 1050 | time | 2x2 blindfolded |
| clkbf | Rubik's Clock: Blindfolded | 1060 | time | Clock blindfolded |
| 333si | Siamese Rubik's Cube | 1100 | time | Siamese Cube |
| rainb | Rainbow Cube | 1110 | time | Rainbow Cube |
| snake | Rubik's Snake | 1120 | time | Rubik's Snake |
| mirbl | Mirror Blocks | 1140 | time | Mirror Blocks |
| 360 | Rubik's 360 | 1150 | time | Rubik's 360 |
| 222oh | 2x2 Cube: One-handed | 1200 | time | 2x2 one-handed |
| magico | Rubik's Magic: One-handed | 1210 | time | Magic one-handed |
+--------+----------------------------------------+------+--------+------------------------------+
35 rows in set (0.00 sec)
rank < 990 means "this event is official". 990 <= rank < 1000 means "this event was once official". rank >= 1000 means "this event was never official". See:
~/gitting/worldcubeassociation.org/webroot/results @kaladin> git grep -i "from *events"
admin/_helpers.php: 'SELECT * FROM Events WHERE rank<990 ORDER BY rank',
admin/check_results.php: $eventIdSet = array_flip( getAllIDs( dbQuery( "SELECT id FROM Events" )));
competition_registration.php: if( count( dbQuery( "SELECT * FROM Events WHERE id='$eventId' AND rank<990" )))
includes/WCAClasses/WCADBConn.class.php: return getAllIDs(dbQuery("SELECT id FROM Events WHERE rank<1000 ORDER BY rank"));
includes/_database.php: return getAllIDs(dbQuery("SELECT id FROM Events WHERE rank<1000 ORDER BY rank"));
includes/_framework.php: $event = dbQuery( "SELECT * FROM Events WHERE id='$eventId'" );
~/gitting/worldcubeassociation.org/webroot/results @kaladin> Fortunately, it looks like we don't actually have any results for events that were never official:
mysql> SELECT * FROM Results LEFT JOIN Events ON Results.eventId=Events.id WHERE rank>=1000;
Empty set (0.11 sec)
Removing these is a simple migration. Further improvement would be to remove the Events table entirely =).
Metadata
Metadata
Assignees
Labels
META: good first issueSmall/easy change which is a good introduction to working in the WCA repoSmall/easy change which is a good introduction to working in the WCA repo