From c4d360e0ecd1267d609c69080ad55a9fcd3d3985 Mon Sep 17 00:00:00 2001 From: Andrew Ekstedt Date: Thu, 18 Oct 2012 14:59:54 -0700 Subject: [PATCH] Add VersionGroup.identifier --- pokedex/data/csv/version_groups.csv | 30 ++++++++++++++--------------- pokedex/db/tables.py | 2 ++ 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/pokedex/data/csv/version_groups.csv b/pokedex/data/csv/version_groups.csv index 09f0b54..1be825c 100644 --- a/pokedex/data/csv/version_groups.csv +++ b/pokedex/data/csv/version_groups.csv @@ -1,15 +1,15 @@ -id,generation_id,pokedex_id,order -1,1,2,1 -2,1,2,2 -3,2,3,3 -4,2,3,4 -5,3,4,5 -6,3,4,6 -7,3,2,9 -8,4,5,10 -9,4,6,11 -10,4,7,12 -11,5,8,13 -12,3,,7 -13,3,,8 -14,5,9,14 +id,identifier,generation_id,pokedex_id,order +1,red-blue,1,2,1 +2,yellow,1,2,2 +3,gold-silver,2,3,3 +4,crystal,2,3,4 +5,ruby-sapphire,3,4,5 +6,emerald,3,4,6 +7,firered-leafgreen,3,2,9 +8,diamond-pearl,4,5,10 +9,platinum,4,6,11 +10,heartgold-soulsilver,4,7,12 +11,black-white,5,8,13 +12,colosseum,3,,7 +13,xd,3,,8 +14,black2-white2,5,9,14 diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index c302361..e02a342 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -2057,6 +2057,8 @@ class VersionGroup(TableBase): __tablename__ = 'version_groups' id = Column(Integer, primary_key=True, nullable=False, info=dict(description=u"This version group's unique ID.")) + identifier = Column(Unicode(20), nullable=False, unique=True, + info=dict(description=u"This version group's unique textual identifier.")) generation_id = Column(Integer, ForeignKey('generations.id'), nullable=False, info=dict(description=u"The ID of the generation the games in this group belong to.")) pokedex_id = Column(Integer, ForeignKey('pokedexes.id'), nullable=True,