From 0f8fb69e5f245c98405d46f5ec00392f8760bc8b Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Mon, 20 May 2024 00:00:48 -0500 Subject: [PATCH] delete existing rows --- turn-into-sqlite.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/turn-into-sqlite.py b/turn-into-sqlite.py index ca4b7d7..8398123 100644 --- a/turn-into-sqlite.py +++ b/turn-into-sqlite.py @@ -22,6 +22,8 @@ CREATE TABLE IF NOT EXISTS "scores" ( ); """) +c.execute("""DELETE FROM "scores";""") + repo = Repo(".") log_output = repo.git.log('--pretty=%H', '--follow', '--', 'data/output.csv').split('\n') commits = [repo.rev_parse(commit_hash) for commit_hash in log_output]