Initial commit
This commit is contained in:
11
database/db.py
Normal file
11
database/db.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import sqlite3
|
||||
|
||||
from config import PROJECT_ROOT
|
||||
|
||||
DB_PATH = PROJECT_ROOT / "database" / "data_base.db"
|
||||
|
||||
|
||||
def get_connection():
|
||||
conn = sqlite3.connect(DB_PATH)
|
||||
conn.execute("PRAGMA foreign_keys = ON")
|
||||
return conn
|
||||
Reference in New Issue
Block a user