summaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/tables.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla/proxy/tables.sql')
-rw-r--r--src/hydrilla/proxy/tables.sql12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/hydrilla/proxy/tables.sql b/src/hydrilla/proxy/tables.sql
index 3b84741..aa98081 100644
--- a/src/hydrilla/proxy/tables.sql
+++ b/src/hydrilla/proxy/tables.sql
@@ -241,7 +241,7 @@ SELECT
i.item_id, i.identifier,
CASE WHEN
ms.enabled = 'N' AND
- (ms.required OR COUNT(p.payload_id) > 0)
+ COALESCE(ms.active_version_id, -1) = iv.item_version_id
THEN
'A' -- AUTO_ENABLED mapping
ELSE
@@ -260,18 +260,10 @@ FROM
USING (item_id)
JOIN item_versions AS iv
USING (item_id)
- LEFT JOIN payloads AS p
- ON iv.item_version_id = p.mapping_item_id
JOIN repo_iterations AS ri
USING (repo_iteration_id)
JOIN repos AS r
- USING (repo_id)
-WHERE
- i.type = 'M'
-GROUP BY
- ms.enabled, ms.required, ms.active_version_id,
- iv.item_version_id, iv.definition, iv.installed,
- r.repo_id, r.active_iteration_id, r.name, ri.iteration;
+ USING (repo_id);
CREATE TABLE resolved_depended_resources(
payload_id INTEGER,