From 86a2b62e48b250b27e2ec312884579e12a8960bb Mon Sep 17 00:00:00 2001 From: "Lynn \"Zhorken\" Vaughan" Date: Sun, 6 Feb 2011 13:31:20 -0500 Subject: [PATCH] Support null pre-D/P damage class for ??? and Shadow. Rather than marking them "non-damaging". --- pokedex/data/csv/types.csv | 4 ++-- pokedex/db/tables.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pokedex/data/csv/types.csv b/pokedex/data/csv/types.csv index 7676b5c..5c0457a 100644 --- a/pokedex/data/csv/types.csv +++ b/pokedex/data/csv/types.csv @@ -16,5 +16,5 @@ id,name,abbreviation,generation_id,damage_class_id 15,Ice,ICE,1,3 16,Dragon,DRG,1,3 17,Dark,DAR,2,3 -10001,???,???,2,1 -10002,Shadow,SHA,3,1 +10001,???,???,2, +10002,Shadow,SHA,3, diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index 460cfc2..4375c07 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -1264,8 +1264,8 @@ class Type(TableBase): info=dict(description=u"An arbitrary 3-letter abbreviation of this type.", format='plaintext')) # XXX: Or is it not arbitrary? generation_id = Column(Integer, ForeignKey('generations.id'), nullable=False, info=dict(description=u"The ID of the generation this type first appeared in.")) - damage_class_id = Column(Integer, ForeignKey('move_damage_classes.id'), nullable=False, - info=dict(description=u"The ID of the damage class this type's moves had before Generation IV.")) + damage_class_id = Column(Integer, ForeignKey('move_damage_classes.id'), nullable=True, + info=dict(description=u"The ID of the damage class this type's moves had before Generation IV, null if not applicable (e.g. ???).")) class TypeName(TableBase): u"""An official non-English name of an elemental type.""" -- 2.7.4