diff --git a/swarm_to_sqlite/cli.py b/swarm_to_sqlite/cli.py index 02a32ad..ce1fa98 100644 --- a/swarm_to_sqlite/cli.py +++ b/swarm_to_sqlite/cli.py @@ -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: