[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/triples 72f50f9eb0 1/3: Fixed issue where upgrading cou
From: |
ELPA Syncer |
Subject: |
[elpa] externals/triples 72f50f9eb0 1/3: Fixed issue where upgrading could remove indexes |
Date: |
Sun, 11 Jun 2023 18:59:40 -0400 (EDT) |
branch: externals/triples
commit 72f50f9eb00f2136b4641dd3cd40a5a584249dd4
Author: Andrew Hyatt <ahyatt@gmail.com>
Commit: Andrew Hyatt <ahyatt@gmail.com>
Fixed issue where upgrading could remove indexes
This would result in duplicate types.
---
NEWS.org | 2 ++
triples-upgrade.el | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/NEWS.org b/NEWS.org
index ffc8e7656c..0d6fa57e20 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -1,5 +1,7 @@
TITLE: Changelog for the triples module for GNU Emacs.
+* 0.3.1
+- Fix issue with issue where duplicate values could interfere with table index
creation during upgrade, causing type duplication.
* 0.3
- All integers are stored as integers, and not strings. Applications using
this library in previous versions should have users run
~triples-upgrade-to-0.3~.
- Fix for issue where adding schema would overwrite non-schema data on the
same subject.
diff --git a/triples-upgrade.el b/triples-upgrade.el
index cb7bd50dcb..e07a478b42 100644
--- a/triples-upgrade.el
+++ b/triples-upgrade.el
@@ -52,7 +52,7 @@ be correct by default."
db
(sqlite-execute db "ALTER TABLE triples RENAME TO triples_old")
(triples-setup-table-for-builtin db)
- (sqlite-execute db "INSERT INTO triples (subject, predicate, object,
properties) SELECT subject, predicate, object, properties FROM triples_old")
+ (sqlite-execute db "INSERT INTO triples (subject, predicate, object,
properties) SELECT DISTINCT subject, predicate, object, properties FROM
triples_old")
(sqlite-execute db "DROP TABLE triples_old"))
(let ((replace-approved))
(mapc (lambda (column)