X-Git-Url: http://git.veekun.com/zzz-pokedex.git/blobdiff_plain/a2769eb7c1aad6a009126e3be22ddab3c680eccb..afad84e435212d2b1a4b93c8791d9d6fc66a3043:/pokedex/db/tables.py diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index 2af42de..d15cacf 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -177,7 +177,6 @@ class EvolutionChain(TableBase): __tablename__ = 'evolution_chains' id = Column(Integer, primary_key=True, nullable=False) growth_rate_id = Column(Integer, ForeignKey('growth_rates.id'), nullable=False) - steps_to_hatch = Column(Integer, nullable=False) baby_trigger_item = Column(Unicode(12)) class EvolutionTrigger(TableBase): @@ -254,6 +253,12 @@ class ItemInternalID(TableBase): generation_id = Column(Integer, ForeignKey('generations.id'), primary_key=True, autoincrement=False, nullable=False) internal_id = Column(Integer, nullable=False) +class ItemName(TableBase): + __tablename__ = 'item_names' + item_id = Column(Integer, ForeignKey('items.id'), primary_key=True, nullable=False, autoincrement=False) + language_id = Column(Integer, ForeignKey('languages.id'), primary_key=True, nullable=False, autoincrement=False) + name = Column(Unicode(16), nullable=False) + class ItemPocket(TableBase): __tablename__ = 'item_pockets' id = Column(Integer, primary_key=True, nullable=False) @@ -450,6 +455,7 @@ class Pokemon(TableBase): base_experience = Column(Integer, nullable=False) base_happiness = Column(Integer, nullable=False) is_baby = Column(Boolean, nullable=False) + hatch_counter = Column(Integer, nullable=False) has_gen4_fem_sprite = Column(Boolean, nullable=False) has_gen4_fem_back_sprite = Column(Boolean, nullable=False) @@ -747,6 +753,7 @@ Item.berry = relation(Berry, uselist=False, backref='item') Item.flags = relation(ItemFlag, secondary=ItemFlagMap.__table__) Item.flavor_text = relation(ItemFlavorText, order_by=ItemFlavorText.version_group_id.asc(), backref='item') Item.fling_effect = relation(ItemFlingEffect, backref='items') +Item.foreign_names = relation(ItemName, backref='item') Item.machines = relation(Machine, order_by=Machine.version_group_id.asc()) Item.category = relation(ItemCategory) Item.pocket = association_proxy('category', 'pocket') @@ -756,6 +763,8 @@ ItemCategory.pocket = relation(ItemPocket) ItemFlavorText.version_group = relation(VersionGroup) +ItemName.language = relation(Language) + ItemPocket.categories = relation(ItemCategory, order_by=ItemCategory.name) Location.region = relation(Region, backref='locations')