mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 08:35:43 -06:00
* Alerting: Fetch configuration from the database and run a notification instance Co-Authored-By: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
18 lines
719 B
Go
18 lines
719 B
Go
package notifier
|
|
|
|
import "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
|
|
|
|
func alertmanagerConfigurationMigration(mg *migrator.Migrator) {
|
|
alertConfiguration := migrator.Table{
|
|
Name: "alert_configuration",
|
|
Columns: []*migrator.Column{
|
|
{Name: "id", Type: migrator.DB_BigInt, IsPrimaryKey: true, IsAutoIncrement: true},
|
|
{Name: "alertmanager_configuration", Type: migrator.DB_Text, Nullable: false},
|
|
{Name: "configuration_version", Type: migrator.DB_NVarchar, Length: 3}, // In a format of vXX e.g. v1, v2, v10, etc
|
|
{Name: "created_at", Type: migrator.DB_Int, Nullable: false},
|
|
},
|
|
}
|
|
|
|
mg.AddMigration("create_alert_configuration_table", migrator.NewAddTableMigration(alertConfiguration))
|
|
}
|