1
0
Fork 0
mirror of https://github.com/veekun/pokedex.git synced 2024-08-20 18:16:34 +00:00

Give Pokémon internal IDs their own table and add all gens' IDs.

- Gen I has them all mixed around.
- Gen II has no surprises, but I figured it's good to be thorough.
- Gen III has the first 251 in order, then a big break, then the
  third-gen Pokémon mixed around, though families are usually together.
- Gen IV has the 493 in order and then alternate forms after Arceus,
  which will be useful to have once Gen V comes and we have to bump
  the alt forms in the pokemon table forward.
This commit is contained in:
Zhorken 2010-06-07 15:35:22 -04:00
parent 552419db74
commit 577a6b44a4
5 changed files with 1300 additions and 154 deletions
pokedex/db

View file

@ -578,6 +578,12 @@ class PokemonHabitat(TableBase):
id = Column(Integer, primary_key=True, nullable=False, autoincrement=False)
name = Column(Unicode(16), nullable=False)
class PokemonInternalID(TableBase):
__tablename__ = 'pokemon_internal_ids'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, autoincrement=False, nullable=False)
generation_id = Column(Integer, ForeignKey('generations.id'), primary_key=True, autoincrement=False, nullable=False)
internal_id = Column(Integer, nullable=False)
class PokemonItem(TableBase):
__tablename__ = 'pokemon_items'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False)