Skip to content

Commit

Permalink
Fix related configs2 (#618)
Browse files Browse the repository at this point in the history
* fix: migration failure

* chore: fix migrations
moshloop authored Mar 17, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 353f33a commit 9014533
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions views/006_config_views.sql
Original file line number Diff line number Diff line change
@@ -534,7 +534,8 @@ END;
$$ LANGUAGE plpgsql;

-- related configs
DROP FUNCTION IF EXISTS related_configs;
DROP FUNCTION IF EXISTS related_configs(config_id uuid, include_deleted_configs boolean);
DROP FUNCTION IF EXISTS related_configs(config_id uuid, type_filter text, include_deleted_configs boolean);

CREATE FUNCTION related_configs (
config_id UUID,
@@ -567,6 +568,7 @@ $$ LANGUAGE plpgsql;

-- related config changes recursively
DROP FUNCTION IF EXISTS related_changes_recursive(UUID, TEXT, BOOLEAN);
DROP FUNCTION IF EXISTS related_changes_recursive;

CREATE FUNCTION related_changes_recursive (
lookup_id UUID,
@@ -598,7 +600,7 @@ BEGIN
LEFT JOIN config_items c on c.id = cc.config_id
WHERE cc.config_id = lookup_id
OR cc.config_id IN (
SELECT related_config_ids_recursive.id
SELECT related_config_ids_recursive.id
FROM related_config_ids_recursive(
lookup_id,
CASE

0 comments on commit 9014533

Please sign in to comment.