branch: elpa/emacsql commit 44b4f89407ca12c24a8ce304f762c55b95775074 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
emacsql-sqlite-open: Enable foreign key constrains --- emacsql-sqlite.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emacsql-sqlite.el b/emacsql-sqlite.el index ece611bdf0..1b56d5c0eb 100644 --- a/emacsql-sqlite.el +++ b/emacsql-sqlite.el @@ -105,11 +105,12 @@ Automatically use the best available back-end, as returned by If FILE is nil, use an in-memory database. If optional DEBUG is non-nil, log all SQLite commands to a log buffer, for debugging -purposes." +purposes. Always enable support for foreign key constrains." (let* ((class (emacsql-sqlite-default-connection)) (connection (make-instance class :file file))) (when debug (emacsql-enable-debugging connection)) + (emacsql connection [:pragma (= foreign-keys on)]) connection)) (defun emacsql-sqlite-default-connection ()