From ac4c52c7a4501e90ed53f3ca5780bec4551a8c9f Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Thu, 7 Mar 2013 08:43:15 +0100 Subject: enable enforcing foreign keys --- update_sharing.py | 1 + 1 file changed, 1 insertion(+) (limited to 'update_sharing.py') diff --git a/update_sharing.py b/update_sharing.py index dd12e5b..2ed532b 100755 --- a/update_sharing.py +++ b/update_sharing.py @@ -40,6 +40,7 @@ def process_pkgdict(cursor, pkgdict): def main(): db = sqlite3.connect("test.sqlite3") cur = db.cursor() + cur.execute("PRAGMA foreign_keys = ON;") cur.execute("DELETE FROM sharing;") readcur = db.cursor() readcur.execute("SELECT hash FROM content GROUP BY hash HAVING count(*) > 1;") -- cgit v1.2.3