Skip to content

Commit

Permalink
Merge branch 'encounter-id'
Browse files Browse the repository at this point in the history
  • Loading branch information
modrzew committed Aug 8, 2016
2 parents d0941f2 + 94033dd commit d156b60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions db.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class Sighting(Base):
pokemon_id = Column(Integer)
spawn_id = Column(String(32))
expire_timestamp = Column(Integer, index=True)
encounter_id = Column(String(32))
normalized_timestamp = Column(Integer)
lat = Column(String(16), index=True)
lon = Column(String(16), index=True)
Expand Down Expand Up @@ -191,6 +192,7 @@ def add_sighting(session, pokemon):
obj = Sighting(
pokemon_id=pokemon['pokemon_id'],
spawn_id=pokemon['spawn_id'],
encounter_id=str(pokemon['encounter_id']),
expire_timestamp=pokemon['expire_timestamp'],
normalized_timestamp=normalize_timestamp(pokemon['expire_timestamp']),
lat=pokemon['lat'],
Expand Down
1 change: 1 addition & 0 deletions migrations/v0.5.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `sightings` ADD `encounter_id` VARCHAR(32);

0 comments on commit d156b60

Please sign in to comment.