X-Git-Url: http://git.veekun.com/zzz-pokedex.git/blobdiff_plain/fe2921bc415947e45f12d4a639fe97412b018e22..650e19ed2270b7ae9eeb135662725fc840579dab:/pokedex/db/tables.py diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index 0e336ce..8d7f3cf 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -573,7 +573,7 @@ class MoveDamageClass(TableBase): __tablename__ = 'move_damage_classes' id = Column(Integer, primary_key=True, nullable=False, info=dict(description="A numeric ID")) - name = Column(Unicode(8), nullable=False, + name = Column(Unicode(16), nullable=False, info=dict(description="An English name of the class", format='plaintext')) description = Column(Unicode(64), nullable=False, info=dict(description="An English description of the class", format='plaintext')) @@ -673,7 +673,7 @@ class Move(TableBase): info=dict(description="ID of the damage class (physical/special) of the move")) effect_id = Column(Integer, ForeignKey('move_effects.id'), nullable=False, info=dict(description="ID of the move's effect")) - effect_chance = Column(Integer, + effect_chance = Column(Integer, nullable=True info=dict(description="The chance for a secondary effect. What this is a chance of is specified by the move's effect.")) contest_type_id = Column(Integer, ForeignKey('contest_types.id'), nullable=True, info=dict(description="ID of the move's Contest type (e.g. cool or smart)")) @@ -689,12 +689,18 @@ class MoveChangelog(TableBase): info=dict(description="ID of the move that changed")) changed_in_version_group_id = Column(Integer, ForeignKey('version_groups.id'), primary_key=True, nullable=False, info=dict(description="ID of the version group in which the move changed")) + type_id = Column(Integer, ForeignKey('types.id'), nullable=True, + info=dict(description="Prior type of the move, or NULL if unchanged")) power = Column(SmallInteger, nullable=True, info=dict(description="Prior base power of the move, or NULL if unchanged")) pp = Column(SmallInteger, nullable=True, info=dict(description="Prior base PP of the move, or NULL if unchanged")) accuracy = Column(SmallInteger, nullable=True, info=dict(description="Prior accuracy of the move, or NULL if unchanged")) + effect_id = Column(Integer, ForeignKey('move_effects.id'), nullable=True, + info=dict(description="Prior ID of the effect, or NULL if unchanged")) + effect_chance = Column(Integer, nullable=True, + info=dict(description="Prior effect chance, or NULL if unchanged")) class Nature(TableBase): u"""A nature a pokémon can have, such as Calm or Brave @@ -1375,7 +1381,7 @@ Machine.item = relation(Item) Machine.version_group = relation(VersionGroup) Move.changelog = relation(MoveChangelog, - order_by=MoveChangelog.changed_in_version_group_id.asc(), + order_by=MoveChangelog.changed_in_version_group_id.desc(), backref='move', ) Move.contest_effect = relation(ContestEffect, backref='moves')