summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-14 18:04:38 +0200
committerThanos Apollo <[email protected]>2023-12-14 18:05:44 +0200
commit39cf9fdc3f8ef342bf95000007cb7f950b0367d3 (patch)
treebd564c659001dbfc924cd23afa598a81c5924898 /gnosis.el
parent4dd7f89cde9c95d43d601c4146ff24826cc28627 (diff)
Feature: Add review-log schema
Review log will be used to schedule notes for review as well as keep track of failures
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/gnosis.el b/gnosis.el
index c38394e..1e87819 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -209,11 +209,17 @@ TAGS are used to organize questions."
(ef integer :not-null) ;; Easiness factor
(ff integer :not-null) ;; Forgetting factor
(n integer :not-null) ;; Number of reviews
- (failures integer :not-null) ;; Number of consecutive review failures
(interval integer :not-null)] ;; Interval
(:foreign-key [id] :references notes [id]
:on-delete :cascade)))
+(defvar gnosis-db-review-log-schema '([(id integer :not-null) ;; note-id
+ (last-rev integer :not-null) ;; Last review date
+ (next-rev integer :not-null) ;; Next review date
+ (failures integer :not-null)] ;; Number of consecutive review failures
+ (:foreign-key [id] :references notes [id]
+ :on-delete :cascade)))
+
;; testing
(defun gnosis-test-buffer ()
@@ -248,6 +254,8 @@ TAGS are used to organize questions."
(gnosis--create-table 'notes gnosis-db-notes-schema)
;; Create review table
(gnosis--create-table 'review gnosis-db-review-schema)
+ ;; Create review-log table
+ (gnosis--create-table 'review-log gnosis-db-review-log-schema)
(gnosis-add-deck "Anatomy"))
;; Gnosis mode ;;