X-Git-Url: http://git.veekun.com/zzz-pokedex.git/blobdiff_plain/5ab46d5201035f30e89d248b0f4486f5285180a5..e95d276194381e3c9cf9d877cd7994508102eec0:/pokedex/db/tables.py diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index f804eb2..4c38755 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -133,7 +133,7 @@ class PokemonFlavorText(TableBase): __tablename__ = 'pokemon_flavor_text' pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False) version_id = Column(Integer, ForeignKey('versions.id'), primary_key=True, nullable=False) - flavor = Column(Unicode(255), nullable=False) + flavor_text = Column(Unicode(255), nullable=False) class PokemonName(TableBase): __tablename__ = 'pokemon_names' @@ -199,6 +199,7 @@ Pokemon.egg_groups = relation(EggGroup, secondary=PokemonEggGroup.__table__, order_by=PokemonEggGroup.egg_group_id, backref='pokemon') Pokemon.evolution_chain = relation(EvolutionChain, backref='pokemon') +Pokemon.flavor_text = relation(PokemonFlavorText, backref='pokemon') Pokemon.foreign_names = relation(PokemonName, backref='pokemon') Pokemon.generation = relation(Generation, backref='pokemon') Pokemon.shape = relation(PokemonShape, backref='pokemon') @@ -207,6 +208,8 @@ Pokemon.types = relation(Type, secondary=PokemonType.__table__) PokemonDexNumber.generation = relation(Generation) +PokemonFlavorText.version = relation(Version) + PokemonName.language = relation(Language) PokemonStat.stat = relation(Stat)