diff --git a/scripts/storage.sql b/scripts/storage.sql index 939ed1272..b4d2b859d 100644 --- a/scripts/storage.sql +++ b/scripts/storage.sql @@ -75,7 +75,7 @@ CREATE TABLE IF NOT EXISTS TreeHead( FOREIGN KEY(TreeId) REFERENCES Trees(TreeId) ON DELETE CASCADE ); -CREATE UNIQUE INDEX TreeHeadRevisionIdx +CREATE UNIQUE INDEX IF NOT EXISTS TreeHeadRevisionIdx ON TreeHead(TreeId, TreeRevision); -- ---------------------------------------------