Make Pokemon.shape_id nullable

This commit is contained in:
Andrew Ekstedt 2021-03-09 23:12:51 -08:00
parent de27f2c282
commit e9bc81707e

View file

@ -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,