fix: event alarm not insert to table alarm_event as manual sync alarm
This commit is contained in:
@@ -133,4 +133,9 @@ DELETE FROM `alarm` WHERE `orig_severity` = 'Event';
|
||||
|
||||
COMMIT;
|
||||
|
||||
DELETE FROM alarm_event WHERE id NOT IN (SELECT MIN(id) FROM alarm_event GROUP BY `ne_type`, `ne_id`, `alarm_id`, `event_time`);
|
||||
|
||||
ALTER TABLE `alarm_event`
|
||||
ADD UNIQUE INDEX IF NOT EXISTS `idx_uni_aid_ne_time`(`ne_type`, `ne_id`, `alarm_id`, `event_time`) USING BTREE;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
Reference in New Issue
Block a user