diff options
author | Thanos Apollo <[email protected]> | 2023-12-14 11:02:58 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-12-14 11:02:58 +0200 |
commit | 7ae87b0f67db16e5babec47b681bc45f5be0c060 (patch) | |
tree | e945b849860ea3c523a0662ca87abdb81d03e72b /gnosis.el | |
parent | 55ff1188486d769da8f440a58396cda64d6ef2c6 (diff) |
Add db schemas
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -157,6 +157,28 @@ TAGS are used to organize questions." ("cloze" (message "Not Ready yet.")) (_ (error "Malformed note type"))))) +;; Database Schemas +(defvar gnosis-db-decks-schema '([(id integer :primary-key :autoincrement) + (name text :not-null)])) + +(defvar gnosis-db-notes-schema '([(id integer :primary-key :autoincrement) + (type text :not-null) + (main text :not-null) + (options text :not-null) + (answer text :not-null) + (tags text :default untagged) + (deck-id integer)] + (:foreign-key [deck-id] :references decks [id] + :on-delete :cascade))) + +(defvar gnosis-db-review-schema '([(note-id integer) + (ef integer :default 1.3) + (ff integer :default 0.5) + (n integer :default 0) + (interval integer :default 0)] + (:foreign-key [note-id] :references notes [id] + :on-delete :cascade))) + ;; testing (defun gnosis-test-buffer () "Create testing buffer." |