diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-06-06 17:14:18 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-06-14 11:16:59 +0200 |
commit | 122a6cad7d4a7520593d1dd0c16b3bb8094d7f5a (patch) | |
tree | 4d663bebf68fc58d3f4719a8ba95a8cf3865754d | |
parent | 4bd86f0d62e948f76536ecfea1225a6e9bfa89c8 (diff) | |
download | guix-122a6cad7d4a7520593d1dd0c16b3bb8094d7f5a.tar guix-122a6cad7d4a7520593d1dd0c16b3bb8094d7f5a.tar.gz |
database: Replace existing entries in Refs.
* guix/store/database.scm (add-reference-sql): Add "OR REPLACE".
-rw-r--r-- | guix/store/database.scm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guix/store/database.scm b/guix/store/database.scm index bfd2c36264..094dea3ec8 100644 --- a/guix/store/database.scm +++ b/guix/store/database.scm @@ -141,7 +141,7 @@ of course. Returns the row id of the row that was modified or inserted." (last-insert-row-id db))))) (define add-reference-sql - "INSERT INTO Refs (referrer, reference) VALUES (:referrer, :reference);") + "INSERT OR REPLACE INTO Refs (referrer, reference) VALUES (:referrer, :reference);") (define (add-references db referrer references) "REFERRER is the id of the referring store item, REFERENCES is a list |