aci/backend/aci/migrate.py
Ashhhleyyy 0f592df66f
Some checks failed
Publish docker image / Publish (push) Failing after 1m6s
feat(backend): run migrations on startup
2024-02-18 12:26:07 +00:00

12 lines
329 B
Python

#!/usr/bin/env python3
import sqlite3
def run_migrations():
conn = sqlite3.connect('./checkin.db')
db = conn.cursor()
try:
db.execute("CREATE TABLE IF NOT EXISTS code_results (date text, time text, space text, activity text, code text, result boolean)")
finally:
db.close()
conn.close()