mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Introduce an order
column for version groups
Some code in spline-pokedex orders by `id`, which has worse consequences than it may seem (e.g. instead of defaulting to most recent games, the comparifier defaults to XD). This is the first step to fixing that.
This commit is contained in:
parent
3607b9b3e1
commit
1134415e13
2 changed files with 16 additions and 14 deletions
|
@ -1,14 +1,14 @@
|
|||
id,generation_id,pokedex_id
|
||||
1,1,2
|
||||
2,1,2
|
||||
3,2,3
|
||||
4,2,3
|
||||
5,3,4
|
||||
6,3,4
|
||||
7,3,2
|
||||
8,4,5
|
||||
9,4,6
|
||||
10,4,7
|
||||
11,5,8
|
||||
12,3,4
|
||||
13,3,4
|
||||
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,8
|
||||
8,4,5,10
|
||||
9,4,6,11
|
||||
10,4,7,12
|
||||
11,5,8,13
|
||||
12,3,4,7
|
||||
13,3,4,9
|
||||
|
|
|
|
@ -1587,6 +1587,8 @@ class VersionGroup(TableBase):
|
|||
info=dict(description=u"The ID of the generation the games in this group belong to."))
|
||||
pokedex_id = Column(Integer, ForeignKey('pokedexes.id'), nullable=False,
|
||||
info=dict(description=u"The ID of the regional Pokédex used in this version group."))
|
||||
order = Column(Integer, nullable=True,
|
||||
info=dict(description=u"Order for sorting. Almost by date of release, except similar versions are grouped together."))
|
||||
|
||||
class VersionGroupRegion(TableBase):
|
||||
u"""Maps a version group to a region that appears in it."""
|
||||
|
|
Loading…
Reference in a new issue