diff --git a/docs/schema-upgrade-1.15-1.16.sql b/docs/schema-upgrade-1.15-1.16.sql index d278289a..d5a6b08c 100644 --- a/docs/schema-upgrade-1.15-1.16.sql +++ b/docs/schema-upgrade-1.15-1.16.sql @@ -25,6 +25,7 @@ CREATE TABLE host_config ( PRIMARY KEY (create_event, host_id), UNIQUE (host_id, active) ) WITHOUT OIDS; +CREATE INDEX host_config_by_active_and_enabled ON host_config(active, enabled) -- copy starting data -- CREATE FUNCTION pg_temp.user() returns INTEGER as $$ select id from users where name='nobody' $$ language SQL; diff --git a/docs/schema.sql b/docs/schema.sql index 6be88c65..83dfc0a0 100644 --- a/docs/schema.sql +++ b/docs/schema.sql @@ -168,6 +168,7 @@ CREATE TABLE host_config ( PRIMARY KEY (create_event, host_id), UNIQUE (host_id, active) ) WITHOUT OIDS; +CREATE INDEX host_config_by_active_and_enabled ON host_config(active, enabled) CREATE TABLE host_channels ( host_id INTEGER NOT NULL REFERENCES host(id),