summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-25 02:54:11 +0200
committerThanos Apollo <[email protected]>2023-12-25 02:54:11 +0200
commit09aa247237567ebd366e7bba380a65c1733202cb (patch)
tree4cf91d49fea94fb3ecbf3b101a13619253c28c0b /gnosis.el
parent11f73b32a26fcfcfc7279b30280c102b27eb65fc (diff)
Set id as primary-key for all schemas
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnosis.el b/gnosis.el
index aa7087f..e63dc69 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -261,14 +261,14 @@ Returns a list of the form (ef-increase ef-decrease ef)."
(:foreign-key [deck-id] :references decks [id]
:on-delete :cascade)))
-(defvar gnosis-db-schema-review '([(id integer :not-null) ;; note-id
+(defvar gnosis-db-schema-review '([(id integer :primary-key :not-null) ;; note-id
(ef integer :not-null) ;; Easiness factor
(ff integer :not-null) ;; Forgetting factor
(interval integer :not-null)] ;; Interval
(:foreign-key [id] :references notes [id]
:on-delete :cascade)))
-(defvar gnosis-db-schema-review-log '([(id integer :not-null) ;; note-id
+(defvar gnosis-db-schema-review-log '([(id integer :primary-key :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