Commit 4eb574a5 authored by Julien Muchembled's avatar Julien Muchembled

ON DELETE CASCADE requires to enable foreign keys

parent 8c4a1fb4
...@@ -29,6 +29,7 @@ class PeerDB(object): ...@@ -29,6 +29,7 @@ class PeerDB(object):
try INTEGER NOT NULL DEFAULT 0)""") try INTEGER NOT NULL DEFAULT 0)""")
q("CREATE INDEX volatile.stat_try ON stat(try)") q("CREATE INDEX volatile.stat_try ON stat(try)")
q("INSERT INTO volatile.stat (peer) SELECT prefix FROM peer") q("INSERT INTO volatile.stat (peer) SELECT prefix FROM peer")
q("PRAGMA foreign_keys = ON")
try: try:
a = q("SELECT value FROM config WHERE name='registry'").next()[0] a = q("SELECT value FROM config WHERE name='registry'").next()[0]
except StopIteration: except StopIteration:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment