Skip to content

Commit ff80c75

Browse files
authored
Enforce foreign key constraints
1 parent 9453d65 commit ff80c75

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tubesync/common/huey.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ class SqliteStorage(huey_SqliteStorage):
3737
def _create_connection(self):
3838
conn = super()._create_connection()
3939
conn.execute(f'PRAGMA auto_vacuum = {self.auto_vacuum}')
40+
conn.execute('PRAGMA foreign_keys = ON')
4041
conn.execute(f'PRAGMA journal_size_limit = {self.journal_size_limit}')
42+
conn.execute('PRAGMA user_version = 1')
4143
conn.execute(f'PRAGMA wal_autocheckpoint={self.wal_autocheckpoint}')
4244
# copied from huey_SqliteHuey to use EXTRA or NORMAL
4345
# instead of FULL or OFF

0 commit comments

Comments
 (0)