summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-08-07 12:24:48 +0300
committerThanos Apollo <[email protected]>2024-08-07 12:25:15 +0300
commit46938ac464ffa6841b0c02b83f8a88597a39bba3 (patch)
tree866a99b34050c11fd00d052511068ca0101501c8
parentd59cb2f69439b1b2b4a9a51b4d2c678f03de2739 (diff)
db-init: Create db when there are tables<3.
-rw-r--r--gnosis.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnosis.el b/gnosis.el
index 223e27a..2839ff6 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -2308,7 +2308,7 @@ Return note ids for notes that match QUERY."
(defun gnosis-db-init ()
"Create essential directories & database."
(let ((gnosis-curr-version (caar (emacsql gnosis-db (format "PRAGMA user_version")))))
- (unless (length= (emacsql gnosis-db [:select name :from sqlite-master :where (= type table)]) 7)
+ (unless (length> (emacsql gnosis-db [:select name :from sqlite-master :where (= type table)]) 3)
(emacsql-with-transaction gnosis-db
;; Enable foreign keys
(emacsql gnosis-db "PRAGMA foreign_keys = ON")