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

Add Pal Park data.

This commit is contained in:
Andrew Ekstedt 2012-03-26 22:36:05 -07:00
parent 3511bf3076
commit 6e2f7af7b2
3 changed files with 581 additions and 0 deletions
pokedex/db

View file

@ -1020,6 +1020,23 @@ class NaturePokeathlonStat(TableBase):
max_change = Column(Integer, nullable=False,
info=dict(description="Maximum change"))
class PalPark(TableBase):
u"""Pal Park encounter info
"""
__tablename__ = 'pal_park'
__singlename__ = 'pal_park'
species_id = Column(Integer, ForeignKey('pokemon_species.id'), primary_key=True,
info=dict(description="ID of the Pokémon species this data pertains to"))
area = Column(Enum('forest', 'field', 'mountain', 'pond', 'sea', name='pal_park_areas'), nullable=False,
info=dict(description="The area in which this Pokémon can be found"))
base_score = Column(Integer, nullable=False,
info=dict(description="Value used in calculating the player's score in a Pal Park run"))
rate = Column(Integer, nullable=False,
info=dict(description="Base rate for encountering this Pokémon"))
class PokeathlonStat(TableBase):
u"""A Pokéathlon stat, such as "Stamina" or "Jump".
"""
@ -2090,6 +2107,9 @@ PokemonSpecies.generation = relationship(Generation,
PokemonSpecies.shape = relationship(PokemonShape,
innerjoin=True,
backref='species')
PokemonSpecies.pal_park = relationship(PalPark,
uselist=False,
backref='species')
PokemonSpeciesFlavorText.version = relationship(Version, innerjoin=True, lazy='joined')
PokemonSpeciesFlavorText.language = relationship(Language, innerjoin=True, lazy='joined')