summaryrefslogtreecommitdiff
path: root/cgi/init_sqlite.py
blob: acc6153e7a3d3fccca7105a237f14cc6666969e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python3

import os
import sqlite3

db_path = "terminfinder_db.sqlite"

if os.path.exists(db_path):
    print(f"DB named {db_path} already exists")
    exit(1)

con = sqlite3.connect(db_path)
cur = con.cursor()

cur.execute(
    "CREATE TABLE meeting(meeting_id, title, description, possible_dates, participants, PRIMARY KEY (meeting_id))"
)