mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Remove old PokemonMove table and redistribute its column docs.
This commit is contained in:
parent
3ace3d8aa3
commit
1d43c767e1
1 changed files with 13 additions and 27 deletions
|
@ -1898,45 +1898,30 @@ class PokemonItem(TableBase):
|
||||||
rarity = Column(Integer, nullable=False,
|
rarity = Column(Integer, nullable=False,
|
||||||
doc=u"Chance of the Pokémon holding the item, in percent")
|
doc=u"Chance of the Pokémon holding the item, in percent")
|
||||||
|
|
||||||
class OldPokemonMove(TableBase):
|
|
||||||
u"""Record of a move a Pokémon can learn."""
|
|
||||||
__tablename__ = 'pokemon_moves'
|
|
||||||
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), nullable=False, index=True,
|
|
||||||
doc=u"ID of the Pokémon")
|
|
||||||
version_group_id = Column(Integer, ForeignKey('version_groups.id'), nullable=False, index=True,
|
|
||||||
doc=u"ID of the version group this applies to")
|
|
||||||
move_id = Column(Integer, ForeignKey('moves.id'), nullable=False, index=True,
|
|
||||||
doc=u"ID of the move")
|
|
||||||
pokemon_move_method_id = Column(Integer, ForeignKey('pokemon_move_methods.id'), nullable=False, index=True,
|
|
||||||
doc=u"ID of the method this move is learned by")
|
|
||||||
level = Column(Integer, nullable=True, index=True, autoincrement=False,
|
|
||||||
doc=u"Level the move is learned at, if applicable")
|
|
||||||
order = Column(Integer, nullable=True,
|
|
||||||
doc=u"The order which moves learned at the same level are learned in")
|
|
||||||
|
|
||||||
__table_args__ = (
|
|
||||||
PrimaryKeyConstraint('pokemon_id', 'version_group_id', 'move_id', 'pokemon_move_method_id', 'level'),
|
|
||||||
{},
|
|
||||||
)
|
|
||||||
|
|
||||||
pokemon_moveset_table = Table('pokemon_movesets', TableBase.metadata,
|
pokemon_moveset_table = Table('pokemon_movesets', TableBase.metadata,
|
||||||
Column('id', Integer, primary_key=True, autoincrement=True),
|
Column('id', Integer, primary_key=True, autoincrement=True),
|
||||||
#Column('hint', Unicode(79), unique=True, index=True),
|
#Column('hint', Unicode(79), unique=True, index=True),
|
||||||
Column('pokemon_id', Integer, ForeignKey('pokemon.id'), nullable=False),
|
Column('pokemon_id', Integer, ForeignKey('pokemon.id'), nullable=False, index=True,
|
||||||
Column('method_id', Integer, ForeignKey('pokemon_move_methods.id'), nullable=False, index=True),
|
doc=u"ID of the Pokémon"),
|
||||||
|
Column('method_id', Integer, ForeignKey('pokemon_move_methods.id'), nullable=False, index=True,
|
||||||
|
doc=u"ID of the method this move is learned by"),
|
||||||
)
|
)
|
||||||
|
|
||||||
pokemon_moveset_moves_table = Table('pokemon_moveset_moves', TableBase.metadata,
|
pokemon_moveset_moves_table = Table('pokemon_moveset_moves', TableBase.metadata,
|
||||||
Column('moveset_id', Integer, ForeignKey('pokemon_movesets.id'), nullable=False),
|
Column('moveset_id', Integer, ForeignKey('pokemon_movesets.id'), nullable=False),
|
||||||
Column('move_id', Integer, ForeignKey('moves.id'), nullable=False),
|
Column('move_id', Integer, ForeignKey('moves.id'), nullable=False,
|
||||||
Column('level', Integer, nullable=True, autoincrement=False),
|
doc=u"ID of the move"),
|
||||||
Column('order', Integer, nullable=True),
|
Column('level', Integer, nullable=True, autoincrement=False,
|
||||||
|
doc=u"Level the move is learned at, if applicable"),
|
||||||
|
Column('order', Integer, nullable=True,
|
||||||
|
doc=u"The order which moves learned at the same level are learned in"),
|
||||||
PrimaryKeyConstraint('moveset_id', 'move_id', 'level'),
|
PrimaryKeyConstraint('moveset_id', 'move_id', 'level'),
|
||||||
)
|
)
|
||||||
|
|
||||||
pokemon_moveset_version_groups_table = Table('pokemon_moveset_version_groups', TableBase.metadata,
|
pokemon_moveset_version_groups_table = Table('pokemon_moveset_version_groups', TableBase.metadata,
|
||||||
Column('moveset_id', Integer, ForeignKey('pokemon_movesets.id'), nullable=False),
|
Column('moveset_id', Integer, ForeignKey('pokemon_movesets.id'), nullable=False),
|
||||||
Column('version_group_id', Integer, ForeignKey('version_groups.id'), nullable=False),
|
Column('version_group_id', Integer, ForeignKey('version_groups.id'), nullable=False,
|
||||||
|
doc=u"ID of the version group this applies to"),
|
||||||
PrimaryKeyConstraint('moveset_id', 'version_group_id'),
|
PrimaryKeyConstraint('moveset_id', 'version_group_id'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -2239,6 +2224,7 @@ class VersionGroupRegion(TableBase):
|
||||||
doc=u"The ID of the region.")
|
doc=u"The ID of the region.")
|
||||||
|
|
||||||
class PokemonMove(TableBase):
|
class PokemonMove(TableBase):
|
||||||
|
u"""Record of a move a Pokémon can learn."""
|
||||||
__table__ = pokemon_moveset_table.join(pokemon_moveset_moves_table).join(pokemon_moveset_version_groups_table)
|
__table__ = pokemon_moveset_table.join(pokemon_moveset_moves_table).join(pokemon_moveset_version_groups_table)
|
||||||
moveset_id = column_property(pokemon_moveset_table.c.id, pokemon_moveset_moves_table.c.moveset_id, pokemon_moveset_version_groups_table.c.moveset_id)
|
moveset_id = column_property(pokemon_moveset_table.c.id, pokemon_moveset_moves_table.c.moveset_id, pokemon_moveset_version_groups_table.c.moveset_id)
|
||||||
pokemon_move_method_id = column_property(pokemon_moveset_table.c.method_id)
|
pokemon_move_method_id = column_property(pokemon_moveset_table.c.method_id)
|
||||||
|
|
Loading…
Reference in a new issue