from sqlalchemy import Column, ForeignKey, MetaData, Table
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, ForeignKey, MetaData, Table
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import backref, relation
from sqlalchemy.types import *
from sqlalchemy.databases.mysql import *
from sqlalchemy.orm import backref, relation
from sqlalchemy.types import *
from sqlalchemy.databases.mysql import *
__tablename__ = 'moves'
id = Column(Integer, primary_key=True, nullable=False)
name = Column(Unicode(12), nullable=False)
__tablename__ = 'moves'
id = Column(Integer, primary_key=True, nullable=False)
name = Column(Unicode(12), nullable=False)
type_id = Column(Integer, ForeignKey('types.id'), nullable=False)
power = Column(SmallInteger)
pp = Column(SmallInteger, nullable=False)
type_id = Column(Integer, ForeignKey('types.id'), nullable=False)
power = Column(SmallInteger)
pp = Column(SmallInteger, nullable=False)
version_group_id = Column(Integer, ForeignKey('version_groups.id'), nullable=False)
name = Column(Unicode(32), nullable=False)
version_group_id = Column(Integer, ForeignKey('version_groups.id'), nullable=False)
name = Column(Unicode(32), nullable=False)
### Relations down here, to avoid ordering problems
Encounter.pokemon = relation(Pokemon, backref='encounters')
### Relations down here, to avoid ordering problems
Encounter.pokemon = relation(Pokemon, backref='encounters')
LocationArea.location = relation(Location, backref='areas')
Machine.generation = relation(Generation)
Move.type = relation(Type, backref='moves')
LocationArea.location = relation(Location, backref='areas')
Machine.generation = relation(Generation)
Move.type = relation(Type, backref='moves')
Move.effect = relation(MoveEffect, backref='moves')
Move.machines = relation(Machine, backref='move')
Move.effect = relation(MoveEffect, backref='moves')
Move.machines = relation(Machine, backref='move')
Version.version_group = relation(VersionGroup, backref='versions')
VersionGroup.generation = relation(Generation, backref='version_groups')
Version.version_group = relation(VersionGroup, backref='versions')
VersionGroup.generation = relation(Generation, backref='version_groups')