Commit graph

318 commits

Author SHA1 Message Date
Eevee
634ef3ed1e Fixed a slew of foriegn key import problems. #29
Curse's type_id was 0, which is bogus; this has been fixed by creating a
real ????? type.
Fourth-gen moves all had zero as a contest effect id, which was also
bogus.
Pokémon 494 and 495 were junk and have been scrapped entirely.
pokemon_form_groups's description column was too short.

pokedex's connect() now takes kwargs passed to sessionmaker().

A more major change: some tables, like pokemon, are self-referential and
contain rows that refer to rows later in the table (for example, Pikachu
evolves from Pichu, which has a higher id).  At the moment such a row is
loaded, the foreign key is thus bogus.  I solved this by turning on
autocommit and wrapping add() in a try block, then attempting to readd
every failed row again after the rest of the table is finished.  Slows
the import down a bit, but makes it work perfectly with foreign key
checks on.
2009-07-03 23:12:13 -04:00
Eevee
4397dfbb0c Added remaining Pokémon form data. #5
Types, abilities, egg groups, and stats for Shaymin, Giratina, and Rotom forms.
Updated height and weight for Shaymin and Giratina forms.
Added Giratina's form descriptions and updated Shaymin's to mention link
battles and freezing.
2009-06-20 22:32:37 -07:00
Eevee
f9391b409a Added some Pokémon methods to hide form weirdness. #5 2009-06-15 20:48:27 -07:00
Eevee
61f973ab27 Added Platinum forms. #5 2009-06-15 20:48:02 -07:00
Eevee
0af6b1c8ab Oops! Added encoding line to tables.py. #6 2009-05-17 03:01:17 -07:00
Eevee
204fe28c7a Documented crazy encounter schema. #7 2009-05-17 00:18:10 -07:00
Eevee
9f6f210fa5 Added encounter data for Diamond, Pearl, and Platinum.
Finally!  Location order is the same as from the old dex, which was
something like the game but ultimately arbitrary, so it's not any better
now.

This takes a very different approach to storage, rather than copying the
game exactly and trying to fix everything in code.  Comments coming
shortly so other people can actually make use of this.
2009-05-01 06:20:18 -07:00
Eevee
67af605e8d Added a couple extra female back sprite flags, new in Platinum.
Renamed the female-sprite columns as for 'gen4' rather than 'dp'.
2009-03-25 20:48:36 -04:00
Eevee
c4883a95f4 Added relations for evolution.
Alternate Formes also now have NULL evolution chain ids.
2009-03-20 19:28:41 -04:00
Eevee
20c9c23f51 Fixed some MySQL import problems.
Tables weren't being defined as UTF-8 if that wasn't the server default.

A lot of tables were trying to create erroneous auto_increment columns.

Foreign key checks were pretty much fucking everything up.
2009-03-07 18:54:01 -08:00
Eevee
774690026c Added habitat sprites. Renamed flavor to flavor_text.
pokemon_flavor_text.flavor -> pokemon_flavor_text.flavor_text
2009-03-06 19:14:42 -08:00
Eevee
e212038be0 Added Pokemon body shapes. 2009-03-04 19:29:43 -08:00
Eevee
8fa671403b Few more relations, for egg groups and evo chains. 2009-03-03 17:58:27 -08:00
Eevee
7315189b10 Added region names to the generations table. 2009-03-03 17:58:10 -08:00
Eevee
94c70f00d3 Added a generation_id column to the pokemon table. 2009-03-02 01:06:31 -08:00
Eevee
35ac91dc48 Added more table relations, for spline-pokedex Pokemon page. 2009-03-01 19:40:02 -08:00
Eevee
e6f5da6dab Added a whole bunch of foreign keys. 2009-02-23 23:31:35 -08:00
Eevee
bad044d1d8 Initial commit, with much of the data imported.
Includes a wrapper script 'pokedex' that can, so far, read data from a
db and spit out CSVs or deploy CSVs to a db.
2009-02-05 00:05:42 -08:00