mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
db: Make sure to enable foreign keys even after forking
This may be causing #1280, since with `--daemon` the DB is being reopened without enabling the foreign key relations and hence the delete cascades. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
e41d565103
commit
eb531e6da7
1 changed files with 1 additions and 0 deletions
|
@ -522,6 +522,7 @@ void db_reopen_after_fork(struct db *db)
|
|||
fatal("failed to re-open database %s: %s", db->filename,
|
||||
sqlite3_errstr(err));
|
||||
}
|
||||
db_do_exec(__func__, db, "PRAGMA foreign_keys = ON;");
|
||||
}
|
||||
|
||||
s64 db_get_intvar(struct db *db, char *varname, s64 defval)
|
||||
|
|
Loading…
Add table
Reference in a new issue