Snapshot.

This commit is contained in:
2023-04-13 20:46:28 -05:00
parent 5e86b40f38
commit b4bc632ded
5 changed files with 95 additions and 1 deletions

19
init_db.py Normal file
View File

@ -0,0 +1,19 @@
import sqlite3
connection = sqlite3.connect('database.db')
with open('schema.sql') as f:
connection.executescript(f.read())
cur = connection.cursor()
# cur.execute("INSERT INTO posts (title, content) VALUES (?, ?)",
# ('First Post', 'Content for the first post')
# )
#
# cur.execute("INSERT INTO posts (title, content) VALUES (?, ?)",
# ('Second Post', 'Content for the second post')
# )
connection.commit()
connection.close()