mirror of
https://amiok.net/gitea/W1CDN/aprs_tool.git
synced 2025-07-17 17:50:28 +00:00
Snapshot.
This commit is contained in:
19
init_db.py
Normal file
19
init_db.py
Normal 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()
|
Reference in New Issue
Block a user