mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Added a generation_id column to the pokemon table.
This commit is contained in:
parent
35ac91dc48
commit
94c70f00d3
2 changed files with 503 additions and 501 deletions
File diff suppressed because it is too large
Load diff
|
@ -91,6 +91,7 @@ class Pokemon(TableBase):
|
|||
name = Column(Unicode(20), nullable=False)
|
||||
forme_name = Column(Unicode(16))
|
||||
forme_base_pokemon_id = Column(Integer, ForeignKey('pokemon.id'))
|
||||
generation_id = Column(Integer, ForeignKey('generations.id'))
|
||||
evolution_chain_id = Column(Integer, ForeignKey('evolution_chains.id'), nullable=False)
|
||||
evolution_parent_pokemon_id = Column(Integer, ForeignKey('pokemon.id'))
|
||||
evolution_method_id = Column(Integer, ForeignKey('evolution_methods.id'))
|
||||
|
@ -187,6 +188,7 @@ Pokemon.abilities = relation(Ability, secondary=PokemonAbility.__table__,
|
|||
Pokemon.dex_numbers = relation(PokemonDexNumber, backref='pokemon')
|
||||
Pokemon.evolution_chain = relation(EvolutionChain, backref='pokemon')
|
||||
Pokemon.foreign_names = relation(PokemonName, backref='pokemon')
|
||||
Pokemon.generation = relation(Generation, backref='pokemon')
|
||||
Pokemon.stats = relation(PokemonStat, backref='pokemon')
|
||||
Pokemon.types = relation(Type, secondary=PokemonType.__table__)
|
||||
|
||||
|
|
Loading…
Reference in a new issue