diff --git a/mapadroid/db/DbPogoProtoSubmitRaw.py b/mapadroid/db/DbPogoProtoSubmitRaw.py index ff5ec8d49..32d534739 100644 --- a/mapadroid/db/DbPogoProtoSubmitRaw.py +++ b/mapadroid/db/DbPogoProtoSubmitRaw.py @@ -1344,9 +1344,6 @@ async def stations(self, session: AsyncSession, received_timestamp: int, bread_battle_available: bool = station.is_bread_battle_available inactive: bool = station.is_inactive - # Is this needed at all? - cooldown_complete = DatetimeWrapper.fromtimestamp(float(station.cooldown_complete_ms / 1000)) - stations_seen += 1 logger.debug3( "Station detected, id: {}, name: {}, lat: {}, lng: {}, start: {}, end: {}, available: {}, " @@ -1386,6 +1383,8 @@ async def stations(self, session: AsyncSession, received_timestamp: int, station_obj.battle_pokemon_gender = pokemon_data.pokemon_display.gender station_obj.battle_pokemon_costume = pokemon_data.pokemon_display.costume station_obj.battle_pokemon_alignment = pokemon_data.pokemon_display.alignment + station_obj.move_1 = pokemon_data.move1 + station_obj.move_2 = pokemon_data.move2 station_obj.start_time = start_time station_obj.end_time = end_time diff --git a/mapadroid/db/model.py b/mapadroid/db/model.py index a40370403..4a8f99025 100644 --- a/mapadroid/db/model.py +++ b/mapadroid/db/model.py @@ -880,23 +880,24 @@ class Station(Base): latitude = Column(Double(asdecimal=True), nullable=False) longitude = Column(Double(asdecimal=True), nullable=False) name = Column(String(128, 'utf8mb4_unicode_ci'), nullable=False) - battle_spawn = Column(TZDateTime, index=True) - battle_window_start = Column(TZDateTime, index=True) + battle_spawn = Column(TZDateTime) + battle_window_start = Column(TZDateTime) battle_window_end = Column(TZDateTime, index=True) - battle_pokemon_id = Column(SMALLINT(6)) + battle_pokemon_id = Column(SMALLINT(6), index=True) battle_pokemon_form = Column(SMALLINT(6)) battle_pokemon_costume = Column(SMALLINT(6)) battle_pokemon_gender = Column(TINYINT(1)) battle_pokemon_alignment = Column(SMALLINT(6)) + battle_pokemon_move_1 = Column(SMALLINT(6)) + battle_pokemon_move_2 = Column(SMALLINT(6)) battle_level = Column(TINYINT(1)) reward_pokemon_id = Column(SMALLINT(6)) reward_pokemon_form = Column(SMALLINT(6)) reward_pokemon_costume = Column(SMALLINT(6)) reward_pokemon_gender = Column(TINYINT(1)) reward_pokemon_alignment = Column(SMALLINT(6)) - start_time = Column(TZDateTime, index=True) - end_time = Column(TZDateTime, index=True) - cooldown_complete = Column(TZDateTime, index=True) - bread_battle_available = Column(BOOLEAN) - inactive = Column(BOOLEAN) - last_updated = Column(TZDateTime, index=True) + start_time = Column(TZDateTime, nullable=False) + end_time = Column(TZDateTime, index=True, nullable=False) + bread_battle_available = Column(BOOLEAN, nullable=False) + inactive = Column(BOOLEAN, nullable=False) + last_updated = Column(TZDateTime, index=True, nullable=False)