Alerting: Persist alert instance FiredAt field (#105927)
* Persist alert instance fired at * Update protos and tests
This commit is contained in:
@@ -153,4 +153,6 @@ func (oss *OSSMigrations) AddMigration(mg *Migrator) {
|
||||
accesscontrol.AddDatasourceDrilldownRemovalMigration(mg)
|
||||
|
||||
ualert.DropTitleUniqueIndexMigration(mg)
|
||||
|
||||
ualert.AddStateFiredAtColumn(mg)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package ualert
|
||||
|
||||
import "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
|
||||
|
||||
// AddStateFiredAtColumn adds a fired_at column to alert_instance to represent FiredAt.
|
||||
func AddStateFiredAtColumn(mg *migrator.Migrator) {
|
||||
mg.AddMigration("add fired_at column to alert_instance table", migrator.NewAddColumnMigration(migrator.Table{Name: "alert_instance"}, &migrator.Column{
|
||||
Name: "fired_at",
|
||||
Type: migrator.DB_BigInt, // BigInt, to match existing time fields.
|
||||
Nullable: true,
|
||||
}))
|
||||
}
|
||||
Reference in New Issue
Block a user