Fossil SCM

Avoid 'index desctype already exists' error that could occur in some circumstances.

mistachkin 2020-06-10 21:43 trunk
Commit 23fc63e45b5135af6577719124304da8e4b1693db7003c64f4a30ad0cb01077b
1 file changed +2 -1
+2 -1
--- src/name.c
+++ src/name.c
@@ -973,11 +973,12 @@
973973
@ type TEXT, -- file, checkin, wiki, ticket, etc.
974974
@ rcvid INT, -- When the artifact was received
975975
@ summary TEXT, -- Summary comment for the object
976976
@ ref TEXT -- hash of an object to link against
977977
@ );
978
-@ CREATE INDEX desctype ON description(summary) WHERE summary='unknown';
978
+@ CREATE INDEX IF NOT EXISTS desctype
979
+@ ON description(summary) WHERE summary='unknown';
979980
;
980981
981982
/*
982983
** Attempt to describe all phantom artifacts. The artifacts are
983984
** already loaded into the description table and have summary='unknown'.
984985
--- src/name.c
+++ src/name.c
@@ -973,11 +973,12 @@
973 @ type TEXT, -- file, checkin, wiki, ticket, etc.
974 @ rcvid INT, -- When the artifact was received
975 @ summary TEXT, -- Summary comment for the object
976 @ ref TEXT -- hash of an object to link against
977 @ );
978 @ CREATE INDEX desctype ON description(summary) WHERE summary='unknown';
 
979 ;
980
981 /*
982 ** Attempt to describe all phantom artifacts. The artifacts are
983 ** already loaded into the description table and have summary='unknown'.
984
--- src/name.c
+++ src/name.c
@@ -973,11 +973,12 @@
973 @ type TEXT, -- file, checkin, wiki, ticket, etc.
974 @ rcvid INT, -- When the artifact was received
975 @ summary TEXT, -- Summary comment for the object
976 @ ref TEXT -- hash of an object to link against
977 @ );
978 @ CREATE INDEX IF NOT EXISTS desctype
979 @ ON description(summary) WHERE summary='unknown';
980 ;
981
982 /*
983 ** Attempt to describe all phantom artifacts. The artifacts are
984 ** already loaded into the description table and have summary='unknown'.
985

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button