From e9bc81707ee03f7638437885a0cbb806a509f1d0 Mon Sep 17 00:00:00 2001 From: Andrew Ekstedt Date: Tue, 9 Mar 2021 23:12:51 -0800 Subject: [PATCH] Make Pokemon.shape_id nullable --- pokedex/db/tables.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index c034459..72b0261 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -2035,7 +2035,7 @@ class PokemonSpecies(TableBase): doc=u"ID of the species' evolution chain (a.k.a. family)") color_id = Column(Integer, ForeignKey('pokemon_colors.id'), nullable=False, doc=u"ID of this Pokémon's Pokédex color, as used for a gimmick search function in the games.") - shape_id = Column(Integer, ForeignKey('pokemon_shapes.id'), nullable=False, + shape_id = Column(Integer, ForeignKey('pokemon_shapes.id'), nullable=True, doc=u"ID of this Pokémon's body shape, as used for a gimmick search function in the games.") habitat_id = Column(Integer, ForeignKey('pokemon_habitats.id'), nullable=True, doc=u"ID of this Pokémon's habitat, as used for a gimmick search function in the games.") @@ -2864,7 +2864,7 @@ PokemonSpecies.generation = relationship(Generation, innerjoin=True, backref='species') PokemonSpecies.shape = relationship(PokemonShape, - innerjoin=True, + innerjoin=False, backref='species') PokemonSpecies.pal_park = relationship(PalPark, uselist=False,