diff options
author | Thanos Apollo <[email protected]> | 2023-12-14 18:04:38 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-12-14 18:05:44 +0200 |
commit | 39cf9fdc3f8ef342bf95000007cb7f950b0367d3 (patch) | |
tree | bd564c659001dbfc924cd23afa598a81c5924898 | |
parent | 4dd7f89cde9c95d43d601c4146ff24826cc28627 (diff) |
Feature: Add review-log schema
Review log will be used to schedule notes for review as well as keep
track of failures
-rw-r--r-- | gnosis.el | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 ;; |