Alerting: Store instance annotations in alert rule state (#114975)
Alerting: Store annotations in alert instance state
This commit is contained in:
@@ -163,5 +163,7 @@ func (oss *OSSMigrations) AddMigration(mg *Migrator) {
|
||||
|
||||
ualert.AddAlertRuleGroupIndexMigration(mg)
|
||||
|
||||
ualert.AddStateAnnotationsColumn(mg)
|
||||
|
||||
ualert.CollateBinAlertRuleGroup(mg)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package ualert
|
||||
|
||||
import "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
|
||||
|
||||
// AddStateAnnotationsColumn adds annotations column to alert_instance
|
||||
func AddStateAnnotationsColumn(mg *migrator.Migrator) {
|
||||
mg.AddMigration("add annotations column to alert_instance table", migrator.NewAddColumnMigration(migrator.Table{Name: "alert_instance"}, &migrator.Column{
|
||||
Name: "annotations",
|
||||
Type: migrator.DB_Text,
|
||||
Nullable: true,
|
||||
}))
|
||||
}
|
||||
Reference in New Issue
Block a user