Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lufa/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ DROP VIEW IF EXISTS v_host_templates_ordered;
DROP VIEW IF EXISTS v_template_compliance;
DROP VIEW IF EXISTS v_host_compliance;
DROP VIEW IF EXISTS v_host_template_compliance;
DROP INDEX IF EXISTS v_host_templates_index;
DROP MATERIALIZED VIEW IF EXISTS v_host_templates;
DROP VIEW IF EXISTS v_job_status;

Expand Down Expand Up @@ -153,6 +154,9 @@ CREATE MATERIALIZED VIEW v_host_templates AS
JOIN job_templates
ON jobs.tower_job_template_id = job_templates.tower_job_template_id;

CREATE INDEX v_host_templates_index
ON v_host_templates (tower_job_template_id, ansible_host);

CREATE VIEW v_host_template_compliance AS
SELECT
ansible_host,
Expand Down
1 change: 1 addition & 0 deletions tests/integration/lufa/drop_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ DROP INDEX IF EXISTS task_callbacks_task_uuid CASCADE;
DROP INDEX IF EXISTS task_callbacks_ansible_host_index CASCADE;
DROP INDEX IF EXISTS task_callbacks_timestamp_index CASCADE;
DROP INDEX IF EXISTS stats_ansible_host_index CASCADE;
DROP INDEX IF EXISTS v_host_templates_index;

DROP TRIGGER IF EXISTS delete_unreferenced_job_templates ON jobs;
DROP FUNCTION IF EXISTS delete_unreferenced_job_templates();
Expand Down
Loading