1
0
Fork 0
mirror of https://github.com/veekun/pokedex.git synced 2024-08-20 18:16:34 +00:00

Added generation_id to moves.

This commit is contained in:
Eevee 2009-08-12 17:24:35 -07:00
parent a89e00acc3
commit 545cbc8928
2 changed files with 471 additions and 468 deletions
pokedex/db

View file

@ -179,6 +179,7 @@ class Move(TableBase):
__tablename__ = 'moves'
id = Column(Integer, primary_key=True, nullable=False)
name = Column(Unicode(12), nullable=False)
generation_id = Column(Integer, ForeignKey('generations.id'), nullable=False)
type_id = Column(Integer, ForeignKey('types.id'), nullable=False)
power = Column(SmallInteger)
pp = Column(SmallInteger, nullable=False)
@ -385,6 +386,8 @@ LocationArea.location = relation(Location, backref='areas')
Machine.generation = relation(Generation)
Move.type = relation(Type, backref='moves')
Move.generation = relation(Generation, backref='moves')
Move.target = relation(MoveTarget, backref='moves')
Move.effect = relation(MoveEffect, backref='moves')
Move.machines = relation(Machine, backref='move')