mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(alerting): add migration for create and update
This commit is contained in:
@@ -21,7 +21,6 @@ func init() {
|
||||
func GetAlertById(query *m.GetAlertByIdQuery) error {
|
||||
alert := m.AlertRule{}
|
||||
has, err := x.Id(query.Id).Get(&alert)
|
||||
|
||||
if !has {
|
||||
return fmt.Errorf("could not find alert")
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@ func addAlertMigrations(mg *Migrator) {
|
||||
{Name: "query_range", Type: DB_NVarchar, Length: 255, Nullable: false},
|
||||
{Name: "aggregator", Type: DB_NVarchar, Length: 255, Nullable: false},
|
||||
{Name: "state", Type: DB_NVarchar, Length: 255, Nullable: false},
|
||||
{Name: "created", Type: DB_DateTime, Nullable: false},
|
||||
{Name: "updated", Type: DB_DateTime, Nullable: false},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user