server/sqlutils.py
changeset 10205 737271ffe407
parent 10200 cceb2c7c02f4
child 10411 4ee15441f2eb
--- a/server/sqlutils.py	Thu Jan 15 18:53:45 2015 +0100
+++ b/server/sqlutils.py	Thu Jan 15 19:17:32 2015 +0100
@@ -500,6 +500,8 @@
         return (dt.weekday() + 1) % 7
     cnx.create_function("WEEKDAY", 1, weekday)
 
+    cnx.cursor().execute("pragma foreign_keys = on")
+
     import yams.constraints
     yams.constraints.patch_sqlite_decimal()