summaryrefslogtreecommitdiffstats
path: root/database/sqlite
diff options
context:
space:
mode:
authorStelios Fragkakis <52996999+stelfrag@users.noreply.github.com>2023-07-22 01:01:44 +0300
committerGitHub <noreply@github.com>2023-07-22 01:01:44 +0300
commit20a43252be2ce8af9914ec14fc2ccef6c8c740e7 (patch)
tree4bacddf83807fd1fe49ffa189312122891f931b8 /database/sqlite
parent173a3f9bedeb2b8d367e908fdf99a46af19b6f1a (diff)
Improve the update of the alert chart name in the database (#15490)
Disable check during health init Store chart_name when storing a new transition
Diffstat (limited to 'database/sqlite')
-rw-r--r--database/sqlite/sqlite_health.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/database/sqlite/sqlite_health.c b/database/sqlite/sqlite_health.c
index 5a1e72b4ba..151938396d 100644
--- a/database/sqlite/sqlite_health.c
+++ b/database/sqlite/sqlite_health.c
@@ -85,7 +85,8 @@ failed:
#define SQL_INSERT_HEALTH_LOG "INSERT INTO health_log (host_id, alarm_id, " \
"config_hash_id, name, chart, family, exec, recipient, units, chart_context, last_transition_id, chart_name) " \
"VALUES (?,?,?,?,?,?,?,?,?,?,?,?) " \
- "ON CONFLICT (host_id, alarm_id) DO UPDATE SET last_transition_id = excluded.last_transition_id RETURNING health_log_id; "
+ "ON CONFLICT (host_id, alarm_id) DO UPDATE SET last_transition_id = excluded.last_transition_id, " \
+ "chart_name = excluded.chart_name RETURNING health_log_id; "
#define SQL_INSERT_HEALTH_LOG_DETAIL "INSERT INTO health_log_detail (health_log_id, unique_id, alarm_id, alarm_event_id, " \
"updated_by_id, updates_id, when_key, duration, non_clear_duration, flags, exec_run_timestamp, delay_up_to_timestamp, " \