summaryrefslogtreecommitdiff
path: root/update_sharing.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2013-03-07 08:43:15 +0100
committerHelmut Grohne <helmut@subdivi.de>2013-03-07 08:43:15 +0100
commitac4c52c7a4501e90ed53f3ca5780bec4551a8c9f (patch)
treeb6d065fd8386b26ea1b642dfc79b086386a543b3 /update_sharing.py
parentd6638c18872db382a8d1045b6de1f9438c8a25fa (diff)
downloaddebian-dedup-ac4c52c7a4501e90ed53f3ca5780bec4551a8c9f.tar.gz
enable enforcing foreign keys
Diffstat (limited to 'update_sharing.py')
-rwxr-xr-xupdate_sharing.py1
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;")