X-Git-Url: http://git.veekun.com/zzz-pokedex.git/blobdiff_plain/bbb0b4f68f09d68de425046f0fc35e2fd1b6a3da..064889eb9fc08bc439667c5d0384b12d13255782:/pokedex/db/tables.py?ds=sidebyside diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index 576e18e..31b9445 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -208,7 +208,7 @@ class Item(TableBase): __tablename__ = 'items' __singlename__ = 'item' id = Column(Integer, primary_key=True, nullable=False) - name = Column(Unicode(16), nullable=False) + name = Column(Unicode(20), nullable=False) category_id = Column(Integer, ForeignKey('item_categories.id'), nullable=False) cost = Column(Integer, nullable=False) fling_power = Column(Integer, nullable=True) @@ -893,7 +893,7 @@ Pokemon.habitat = association_proxy('pokemon_habitat', 'name') Pokemon.items = relation(PokemonItem, backref='pokemon') Pokemon.generation = relation(Generation, backref='pokemon') Pokemon.shape = relation(PokemonShape, backref='pokemon') -Pokemon.stats = relation(PokemonStat, backref='pokemon') +Pokemon.stats = relation(PokemonStat, backref='pokemon', order_by=PokemonStat.stat_id.asc()) Pokemon.types = relation(Type, secondary=PokemonType.__table__, order_by=PokemonType.slot.asc()) PokemonDexNumber.pokedex = relation(Pokedex)