emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/emacsql c85ab1f7b4 194/427: Enable foreign keys in SQLite


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql c85ab1f7b4 194/427: Enable foreign keys in SQLite by default.
Date: Tue, 13 Dec 2022 02:59:41 -0500 (EST)

branch: elpa/emacsql
commit c85ab1f7b4704c6ef1469328e9044e4693b1e4b0
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>

    Enable foreign keys in SQLite by default.
---
 emacsql-sqlite.el | 1 +
 emacsql-tests.el  | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/emacsql-sqlite.el b/emacsql-sqlite.el
index 6a12f719a9..778e3b9c44 100644
--- a/emacsql-sqlite.el
+++ b/emacsql-sqlite.el
@@ -61,6 +61,7 @@ buffer. This is for debugging purposes."
             ".separator ' '"
             ".nullvalue nil"
             "PRAGMA busy_timeout = 30000;"
+            "PRAGMA foreign_keys = 1;"
             ".prompt ]"
             "EMACSQL;")) ; error message flush
     (when debug
diff --git a/emacsql-tests.el b/emacsql-tests.el
index e635d93999..31c6567bf6 100644
--- a/emacsql-tests.el
+++ b/emacsql-tests.el
@@ -217,7 +217,6 @@
   "Tests that foreign keys work properly through Emacsql."
   (emacsql-with-connection (db (emacsql-sqlite nil))
     (emacsql-thread db
-      [:pragma (= foreign_keys on)]
       [:create-table person [(id integer :primary) name]]
       [:create-table likes ([(personid integer) color]
                             :foreign (personid person id :on-delete :cascade))]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]