Added canonical_pokedex, Pokedex.region, and some Pokédex descriptions.

This commit is contained in:
Eevee 2010-03-29 20:22:57 -07:00
parent b3eb81225a
commit e73eca020c
3 changed files with 19 additions and 15 deletions

View file

@ -1,5 +1,5 @@
id,main_region_id,name id,main_region_id,canonical_pokedex_id,name
1,1,Generation I 1,1,2,Generation I
2,2,Generation II 2,2,7,Generation II
3,3,Generation III 3,3,4,Generation III
4,4,Generation IV 4,4,6,Generation IV

1 id main_region_id canonical_pokedex_id name
2 1 1 2 Generation I
3 2 2 7 Generation II
4 3 3 4 Generation III
5 4 4 6 Generation IV

View file

@ -1,9 +1,9 @@
id,name,description id,region_id,name,description
1,National, 1,,National,Entire National dex
2,Kanto, 2,1,Kanto,Red/Blue/Yellow Kanto dex
3,Johto,"Gold/Silver/Crystal Johto dex: called the ""New"" Pokédex in-game" 3,2,Johto,"Gold/Silver/Crystal Johto dex—called the ""New"" Pokédex in-game"
4,Hoenn, 4,3,Hoenn,Ruby/Sapphire/Emerald Hoenn dex
5,Sinnoh,Diamond/Pearl Sinnoh dex 5,4,Sinnoh,Diamond/Pearl Sinnoh dex
6,Sinnoh,Platinum Sinnoh dex: an extended version of Diamond and Pearl's 6,4,Sinnoh,Platinum Sinnoh dex—an extended version of Diamond and Pearl's
7,Johto,"HeartGold/SoulSilver Johto dex: a slightly extended version of Gold, Silver, and Crystal's, adding five Generation IV evolutions of Generation I and Generation II Pokémon" 7,2,Johto,"HeartGold/SoulSilver Johto dex—Gold/Silver/Crystal's, extended to add Generation IV evolutions"
8,Internal ID,IDs used internally in Generation I 8,1,Internal ID,IDs used internally in Generation I

1 id region_id name description
2 1 National Entire National dex
3 2 1 Kanto Red/Blue/Yellow Kanto dex
4 3 2 Johto Gold/Silver/Crystal Johto dex: called the "New" Pokédex in-game Gold/Silver/Crystal Johto dex—called the "New" Pokédex in-game
5 4 3 Hoenn Ruby/Sapphire/Emerald Hoenn dex
6 5 4 Sinnoh Diamond/Pearl Sinnoh dex
7 6 4 Sinnoh Platinum Sinnoh dex: an extended version of Diamond and Pearl's Platinum Sinnoh dex—an extended version of Diamond and Pearl's
8 7 2 Johto HeartGold/SoulSilver Johto dex: a slightly extended version of Gold, Silver, and Crystal's, adding five Generation IV evolutions of Generation I and Generation II Pokémon HeartGold/SoulSilver Johto dex—Gold/Silver/Crystal's, extended to add Generation IV evolutions
9 8 1 Internal ID IDs used internally in Generation I

View file

@ -145,6 +145,7 @@ class Generation(TableBase):
__tablename__ = 'generations' __tablename__ = 'generations'
id = Column(Integer, primary_key=True, nullable=False) id = Column(Integer, primary_key=True, nullable=False)
main_region_id = Column(Integer, ForeignKey('regions.id')) main_region_id = Column(Integer, ForeignKey('regions.id'))
canonical_pokedex_id = Column(Integer, ForeignKey('pokedexes.id'))
name = Column(Unicode(16), nullable=False) name = Column(Unicode(16), nullable=False)
class GrowthRate(TableBase): class GrowthRate(TableBase):
@ -275,6 +276,7 @@ class Nature(TableBase):
class Pokedex(TableBase): class Pokedex(TableBase):
__tablename__ = 'pokedexes' __tablename__ = 'pokedexes'
id = Column(Integer, primary_key=True, nullable=False) id = Column(Integer, primary_key=True, nullable=False)
region_id = Column(Integer, ForeignKey('regions.id'), nullable=True)
name = Column(Unicode(16), nullable=False) name = Column(Unicode(16), nullable=False)
description = Column(Unicode(512)) description = Column(Unicode(512))
@ -523,6 +525,7 @@ EncounterSlotCondition.condition = relation(EncounterCondition,
EvolutionChain.growth_rate = relation(GrowthRate, backref='evolution_chains') EvolutionChain.growth_rate = relation(GrowthRate, backref='evolution_chains')
Generation.canonical_pokedex = relation(Pokedex, backref='canonical_for_generation')
Generation.versions = relation(Version, secondary=VersionGroup.__table__) Generation.versions = relation(Version, secondary=VersionGroup.__table__)
Generation.main_region = relation(Region) Generation.main_region = relation(Region)
@ -568,7 +571,8 @@ Nature.decreased_stat = relation(Stat, primaryjoin=Nature.decreased_stat_id==Sta
Nature.increased_stat = relation(Stat, primaryjoin=Nature.increased_stat_id==Stat.id, Nature.increased_stat = relation(Stat, primaryjoin=Nature.increased_stat_id==Stat.id,
backref='increasing_natures') backref='increasing_natures')
Pokedex.version_groups = relation(VersionGroup, secondary=PokedexVersionGroup.__table__) Pokedex.region = relation(Region, backref='pokedexes')
Pokedex.version_groups = relation(VersionGroup, secondary=PokedexVersionGroup.__table__, backref='pokedexes')
Pokemon.abilities = relation(Ability, secondary=PokemonAbility.__table__, Pokemon.abilities = relation(Ability, secondary=PokemonAbility.__table__,
order_by=PokemonAbility.slot, order_by=PokemonAbility.slot,