diff options
| author | Marius Peter <dev@marius-peter.com> | 2025-12-13 22:15:58 +0100 |
|---|---|---|
| committer | Marius Peter <dev@marius-peter.com> | 2025-12-13 22:15:58 +0100 |
| commit | d126203ad9a178392918cf1512a779f9b37caaf7 (patch) | |
| tree | 6ba1f14938387a6ec3f56eb3aa49f96761929b0f | |
| parent | 510729b256403691c112d8920ee67575b8c125ef (diff) | |
Activate the foreign_keys pragma.
This is required for cascading delete operations.
| -rw-r--r-- | db/conn.rkt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/db/conn.rkt b/db/conn.rkt index 11abc19..0219450 100644 --- a/db/conn.rkt +++ b/db/conn.rkt @@ -16,6 +16,7 @@ (debug-log (format "Connection already instantiated: ~a" (current-conn))) (begin (current-conn (sqlite3-connect #:database path #:mode 'create)) + (query-exec (current-conn) "PRAGMA foreign_keys = ON") (debug-log (format "Connection instantiated: ~a" (current-conn)))))) (define (disconnect!) |