From 7916298c3ae8b5c1e854eb3e4fb6eef9ed0009ce Mon Sep 17 00:00:00 2001 From: Andrew Hyatt Date: Sat, 31 Aug 2024 17:13:09 -0400 Subject: [PATCH] Remove never-used schema for named, email, and person --- doc/ekg.org | 3 ++- doc/ekg.texi | 7 ++++++- ekg.el | 15 +++++++++------ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/doc/ekg.org b/doc/ekg.org index 21a27ef..c2d004d 100644 --- a/doc/ekg.org +++ b/doc/ekg.org @@ -74,7 +74,8 @@ triples library is already installed. #+end_src * Changelog ** Version 0.6.3 --Fix issue in trying to get a single-valued item to show up in the metadata line +- Fix issue in trying to get a single-valued item to show up in the metadata line. +- Remove the never-used named, email, and person schema. ** Version 0.6.2 - Add export to [[https://github.com/protesilaos/denote][denote]] (by [[https://github.com/jayrajput][Jay Rajput]]) ** Version 0.6.1 diff --git a/doc/ekg.texi b/doc/ekg.texi index 850c65e..d337920 100644 --- a/doc/ekg.texi +++ b/doc/ekg.texi @@ -223,7 +223,12 @@ triples library is already installed. @node Version 063 @section Version 0.6.3 --Fix issue in trying to get a single-valued item to show up in the metadata line +@itemize +@item +Fix issue in trying to get a single-valued item to show up in the metadata line. +@item +Remove the never-used named, email, and person schema. +@end itemize @node Version 062 @section Version 0.6.2 diff --git a/ekg.el b/ekg.el index 7b5c265..0842e8c 100644 --- a/ekg.el +++ b/ekg.el @@ -4,7 +4,7 @@ ;; Author: Andrew Hyatt ;; Homepage: https://github.com/ahyatt/ekg -;; Package-Requires: ((triples "0.3.5") (emacs "28.1") (llm "0.17.0")) +;; Package-Requires: ((triples "0.4.0") (emacs "28.1") (llm "0.17.0")) ;; Keywords: outlines, hypermedia ;; Version: 0.6.2 ;; SPDX-License-Identifier: GPL-3.0-or-later @@ -367,10 +367,6 @@ callers have already called this function") '(for-text :base/unique t)) (triples-add-schema ekg-db 'tag '(tagged :base/virtual-reversed tagged/tag)) - (triples-add-schema ekg-db 'named 'name) - (triples-add-schema ekg-db 'email 'address) - ;; Person is just a marker - (triples-add-schema ekg-db 'person) ;; A URL can be a subject too, and has data, including the title. The title is ;; something that can be used to select the subject via completion. (triples-add-schema ekg-db 'titled '(title :base/type string)) @@ -2283,9 +2279,16 @@ the database after the upgrade, in list form." ;; We have done upgrades to 0.3.1, but we want to re-do them for ;; additional bugfixes. There should be no downside to doing the ;; upgrade many times. - (version-list-< from-version '(0 3 2))))) + (version-list-< from-version '(0 3 2)))) + (need-type-removal-upgrade + (or (null from-version) + (version-list-< from-version '(0 6 3))))) (ekg-connect) ;; In the future, we can separate out the backup from the upgrades. + (when need-type-removal-upgrade + (ekg-backup t) + (triples-remove-schema-type ekg-db 'person) + (triples-remove-schema-type ekg-db 'email)) (when need-triple-0.3-upgrade (ekg-backup t) ;; This converts all string integers in subjects and objects to real integers.