From 842c3ef43bdd70f2a252bf9e673106ac4a533621 Mon Sep 17 00:00:00 2001 From: Bernd Gollesch Date: Fri, 21 Nov 2014 12:19:58 +0100 Subject: [PATCH] switch on FK because we need it --- misc/gen_csv.py | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/gen_csv.py b/misc/gen_csv.py index 53ca4af7..f6cee713 100644 --- a/misc/gen_csv.py +++ b/misc/gen_csv.py @@ -43,6 +43,7 @@ def exportTables(dbFilename, exportPath, exportTable=None, quiet=True, debug=0): if not quiet: print("Using database '{}'".format(dbFilename)) conn = sqlite3.connect(str(dbFilename)) conn.row_factory = sqlite3.Row + conn.execute("PRAGMA foreign_keys=ON") # for some tables the first two columns will be reversed reverseList = [ 'AltItemNames',