mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Migration to not fail if alert_configuration table is not empty (#67924)
This commit is contained in:
parent
9d16718acc
commit
0ce7f7eaf4
@ -457,6 +457,9 @@ func (m *migration) writeAlertmanagerConfig(orgID int64, amConfig *PostableUserC
|
||||
return err
|
||||
}
|
||||
|
||||
// remove an existing configuration, which could have been left during switching back to legacy alerting
|
||||
_, _ = m.sess.Delete(AlertConfiguration{OrgID: orgID})
|
||||
|
||||
// We don't need to apply the configuration, given the multi org alertmanager will do an initial sync before the server is ready.
|
||||
_, err = m.sess.Insert(AlertConfiguration{
|
||||
AlertmanagerConfiguration: string(rawAmConfig),
|
||||
|
Loading…
Reference in New Issue
Block a user