diff options
Diffstat (limited to 'init_sqlite.py')
| -rw-r--r-- | init_sqlite.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/init_sqlite.py b/init_sqlite.py new file mode 100644 index 0000000..acc6153 --- /dev/null +++ b/init_sqlite.py @@ -0,0 +1,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))" +) |
