X-Git-Url: http://git.veekun.com/zzz-pokedex.git/blobdiff_plain/2de5a951d1daf84640e1230eb623509d0c24d554..cfbbcdee866e534ca53d8a019ace48c713ac778f:/pokedex/db/tables.py?ds=sidebyside diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index 9e0dc88..f2a31ee 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -172,6 +172,12 @@ class EvolutionMethod(TableBase): name = Column(Unicode(64), nullable=False) description = Column(Unicode(255), nullable=False) +class Experience(TableBase): + __tablename__ = 'experience' + growth_rate_id = Column(Integer, ForeignKey('growth_rates.id'), primary_key=True, nullable=False) + level = Column(Integer, primary_key=True, nullable=False, autoincrement=False) + experience = Column(Integer, nullable=False) + class Generation(TableBase): __tablename__ = 'generations' id = Column(Integer, primary_key=True, nullable=False) @@ -634,6 +640,8 @@ EncounterSlotCondition.condition = relation(EncounterCondition, EvolutionChain.growth_rate = relation(GrowthRate, backref='evolution_chains') +Experience.growth_rate = relation(GrowthRate, backref='experience_table') + Generation.canonical_pokedex = relation(Pokedex, backref='canonical_for_generation') Generation.versions = relation(Version, secondary=VersionGroup.__table__) Generation.main_region = relation(Region)