From 6e9a8b5b97bc2c389126f04b25052e95578a8d8a Mon Sep 17 00:00:00 2001 From: gourav Date: Fri, 21 Jun 2024 10:08:26 +0530 Subject: [PATCH] foreign key support enabled --- migration.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migration.py b/migration.py index abe9eba..c425405 100644 --- a/migration.py +++ b/migration.py @@ -5,7 +5,9 @@ import sqlite3 def connect_db(): - return sqlite3.connect('database/database.sqlite') + conn = sqlite3.connect('database/database.sqlite') + conn.execute("PRAGMA foreign_keys = 1") + return conn def create_user_table():