diff --git a/src/sql/hydra.sql b/src/sql/hydra.sql index a39d9aac..869175d6 100644 --- a/src/sql/hydra.sql +++ b/src/sql/hydra.sql @@ -691,6 +691,6 @@ create index IndexBuildsOnNotificationPendingSince on Builds(notificationPending #ifdef POSTGRESQL -- Provide an index used by LIKE operator on builds.drvpath (search query) -CREATE EXTENSION pg_trgm; -CREATE INDEX IndexTrgmBuildsOnDrvpath ON builds USING gin (drvpath gin_trgm_ops); +create extension pg_trgm; +create index IndexTrgmBuildsOnDrvpath on builds using gin (drvpath gin_trgm_ops); #endif diff --git a/src/sql/upgrade-57.sql b/src/sql/upgrade-57.sql index f950a6e0..04826ab0 100644 --- a/src/sql/upgrade-57.sql +++ b/src/sql/upgrade-57.sql @@ -1,2 +1,2 @@ -CREATE EXTENSION pg_trgm; -CREATE INDEX IndexTrgmBuildsOnDrvpath ON builds USING gin (drvpath gin_trgm_ops); +create extension pg_trgm; +create index IndexTrgmBuildsOnDrvpath on builds using gin (drvpath gin_trgm_ops);