Skip to content

Allow appending to database if oha table has already been created #742

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2025

Conversation

kntng
Copy link
Contributor

@kntng kntng commented May 30, 2025

Addresses #734

This PR goes the route I mentioned of just automatically appending to the DB without failing if the table already exists.

Namely we use

CREATE TABLE IF NOT EXISTS oha 

instead of

CREATE TABLE oha 

Runs are separated by start time of the run which is accurate to the second. I would prefer milliseconds to reduce risk of a collision but .as_millis() returns u128 which does not implement ToSql. If there is a better alternative suggested I can implement that.

@hatoo
Copy link
Owner

hatoo commented May 30, 2025

I think the risk of collision is negligible even if using second

@hatoo hatoo merged commit e18c8a5 into hatoo:master May 30, 2025
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants