diff options
author | Helmut Grohne <helmut@subdivi.de> | 2013-03-07 08:43:15 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2013-03-07 08:43:15 +0100 |
commit | ac4c52c7a4501e90ed53f3ca5780bec4551a8c9f (patch) | |
tree | b6d065fd8386b26ea1b642dfc79b086386a543b3 /update_sharing.py | |
parent | d6638c18872db382a8d1045b6de1f9438c8a25fa (diff) | |
download | debian-dedup-ac4c52c7a4501e90ed53f3ca5780bec4551a8c9f.tar.gz |
enable enforcing foreign keys
Diffstat (limited to 'update_sharing.py')
-rwxr-xr-x | update_sharing.py | 1 |
1 files changed, 1 insertions, 0 deletions
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;") |