diff --git a/schemas/schema-upgrade-1.35-1.36.sql b/schemas/schema-upgrade-1.35-1.36.sql index ef3de75b..1f758e2b 100644 --- a/schemas/schema-upgrade-1.35-1.36.sql +++ b/schemas/schema-upgrade-1.35-1.36.sql @@ -8,4 +8,11 @@ INSERT INTO archivetypes (name, description, extensions) VALUES ('erofs-compress INSERT INTO archivetypes (name, description, extensions) VALUES ('squashfs', 'SquashFS image', 'squashfs') ON CONFLICT DO NOTHING; INSERT INTO archivetypes (name, description, extensions) VALUES ('squashfs-compressed', 'Compressed SquashFS image', 'squashfs.gz squashfs.xz') ON CONFLICT DO NOTHING; +-- https://pagure.io/koji/issue/3963 +CREATE INDEX IF NOT EXISTS standard_buildroot_host_id on standard_buildroot(host_id); +CREATE INDEX IF NOT EXISTS standard_buildroot_repo_id on standard_buildroot(repo_id); +CREATE INDEX IF NOT EXISTS standard_buildroot_task_id on standard_buildroot(task_id); +CREATE INDEX IF NOT EXISTS standard_buildroot_create_event on standard_buildroot(create_event); +CREATE INDEX IF NOT EXISTS standard_buildroot_retire_event on standard_buildroot(retire_event); + COMMIT; diff --git a/schemas/schema.sql b/schemas/schema.sql index 2a997832..f71dc9a4 100644 --- a/schemas/schema.sql +++ b/schemas/schema.sql @@ -626,6 +626,12 @@ CREATE TABLE standard_buildroot ( state INTEGER ) WITHOUT OIDS; +CREATE INDEX standard_buildroot_host_id on standard_buildroot(host_id); +CREATE INDEX standard_buildroot_repo_id on standard_buildroot(repo_id); +CREATE INDEX standard_buildroot_task_id on standard_buildroot(task_id); +CREATE INDEX standard_buildroot_create_event on standard_buildroot(create_event); +CREATE INDEX standard_buildroot_retire_event on standard_buildroot(retire_event); + CREATE TABLE buildroot_tools_info ( buildroot_id INTEGER NOT NULL REFERENCES buildroot(id), tool TEXT NOT NULL,