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

Added foreign nature names to the database.

Same as abilities.  Japanese as ripped from SoulSilver; French, German,
Italian, and Spanish as ripped from Platinum.
This commit is contained in:
Zhorken 2010-06-07 20:14:37 -04:00
parent 77bec54324
commit 12aaf06359
2 changed files with 135 additions and 0 deletions
pokedex/db

View file

@ -393,6 +393,12 @@ class NatureBattleStylePreference(TableBase):
low_hp_preference = Column(Integer, nullable=False)
high_hp_preference = Column(Integer, nullable=False)
class NatureName(TableBase):
__tablename__ = 'nature_names'
nature_id = Column(Integer, ForeignKey('natures.id'), primary_key=True, nullable=False, autoincrement=False)
language_id = Column(Integer, ForeignKey('languages.id'), primary_key=True, nullable=False, autoincrement=False)
name = Column(Unicode(8), nullable=False)
class NaturePokeathlonStat(TableBase):
__tablename__ = 'nature_pokeathlon_stats'
nature_id = Column(Integer, ForeignKey('natures.id'), primary_key=True, nullable=False)
@ -791,6 +797,7 @@ MoveFlavorText.version_group = relation(VersionGroup)
MoveName.language = relation(Language)
Nature.foreign_names = relation(NatureName, backref='nature')
Nature.decreased_stat = relation(Stat, primaryjoin=Nature.decreased_stat_id==Stat.id,
backref='decreasing_natures')
Nature.increased_stat = relation(Stat, primaryjoin=Nature.increased_stat_id==Stat.id,
@ -806,6 +813,8 @@ Nature.pokeathlon_effects = relation(NaturePokeathlonStat, order_by=NaturePokeat
NatureBattleStylePreference.battle_style = relation(MoveBattleStyle, backref='nature_preferences')
NatureName.language = relation(Language)
NaturePokeathlonStat.pokeathlon_stat = relation(PokeathlonStat, backref='nature_effects')
Pokedex.region = relation(Region, backref='pokedexes')