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:
@@ -457,6 +457,9 @@ func (m *migration) writeAlertmanagerConfig(orgID int64, amConfig *PostableUserC
|
|||||||
return err
|
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.
|
// 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{
|
_, err = m.sess.Insert(AlertConfiguration{
|
||||||
AlertmanagerConfiguration: string(rawAmConfig),
|
AlertmanagerConfiguration: string(rawAmConfig),
|
||||||
|
|||||||
Reference in New Issue
Block a user