mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Delete invalid alert maps (#8390)
This commit is contained in:
committed by
Neil Lathwood
parent
0aed9788e3
commit
aec567f890
5
sql-schema/245.sql
Normal file
5
sql-schema/245.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
DELETE FROM `alert_device_map` WHERE `device_id` NOT IN (SELECT `device_id` FROM `devices`);
|
||||
DELETE FROM `alert_device_map` WHERE `rule_id` NOT IN (SELECT `id` FROM `alert_rules`);
|
||||
DELETE FROM `alert_group_map` WHERE `group_id` NOT IN (SELECT `group_id` FROM `device_groups`);
|
||||
DELETE FROM `alert_group_map` WHERE `rule_id` NOT IN (SELECT `id` FROM `alert_rules`);
|
||||
|
Reference in New Issue
Block a user