parent
1acf332f6b
commit
52f0fc9177
|
@ -8,7 +8,7 @@ DELETE ss FROM icinga_service_set AS ss
|
|||
-- cleanup dangling services to service_set
|
||||
DELETE s FROM icinga_service AS s
|
||||
LEFT JOIN icinga_service_set AS ss ON ss.id = s.service_set_id
|
||||
WHERE s.object_type = 'object'
|
||||
WHERE s.object_type IN ('object', 'apply')
|
||||
AND s.service_set_id IS NOT NULL
|
||||
AND ss.id IS NULL;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ DELETE FROM icinga_service AS s
|
|||
SELECT 1 FROM icinga_service_set AS ss
|
||||
WHERE ss.id = s.service_set_id
|
||||
)
|
||||
AND object_type = 'object'
|
||||
AND object_type IN ('object', 'apply')
|
||||
AND service_set_id IS NOT NULL;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue