Skip to content

Commit

Permalink
Create events table if there's no events in the history to avoid SQL …
Browse files Browse the repository at this point in the history
…errors
  • Loading branch information
redmanmale committed Oct 1, 2022
1 parent 3935b65 commit a713eeb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions swarm_to_sqlite/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def cli(db_path, token, load, save, since, silent):
bar.update(1)
if save:
saved.append(checkin)
if not db["events"].exists():
db["events"].create({ "id": str, "name": str}, pk="id")
ensure_foreign_keys(db)
create_views(db)
if save:
Expand Down

0 comments on commit a713eeb

Please sign in to comment.