Closed magical closed 3 years ago
Another option, from #74, is to add a test to check whether it is outdated.
But that's dumb -- if we know that it is outdated then we have enough information to update it, so we should just do that instead of bugging the user about it.
if it must stay in the database, we could construct it automatically when pokemon_moves is loaded.
We can easily do this at the end of load
, either before or after Translations. We can even keep the csv file around -- it's harmless during load, and dumping it would let you see if anything changed. Load/dump becomes a simple way to regenerate the csv file, and that gives us a test for free since the CI verifies that load/dump round trips.
It would only need to be regenerated when we're loading pokemon_moves or itself.
Aside from being a mouthful, it's entirely redundant and gets out of sync easily.
Spline pokedex uses it a) when constructing the move table, and b) to filter out half-ripped versions in the comparifier. (B) isn't important and (A) doesn't actually require a real database table. We could just as easily query the database at startup time, build an equivalent structure in memory and use that during move table construction. Or, if it must stay in the database, we could construct it automatically when pokemon_moves is loaded.