diff options
author | Thanos Apollo <[email protected]> | 2024-08-07 12:24:48 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-08-07 12:25:15 +0300 |
commit | 46938ac464ffa6841b0c02b83f8a88597a39bba3 (patch) | |
tree | 866a99b34050c11fd00d052511068ca0101501c8 | |
parent | d59cb2f69439b1b2b4a9a51b4d2c678f03de2739 (diff) |
db-init: Create db when there are tables<3.
-rw-r--r-- | gnosis.el | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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") |