From 09aa247237567ebd366e7bba380a65c1733202cb Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Mon, 25 Dec 2023 02:54:11 +0200 Subject: Set id as primary-key for all schemas --- gnosis.el | 4 ++-- 1 file 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 -- cgit v1.2.3