feat(alerting): add datasource ref to alert rule
This commit is contained in:
@@ -11,7 +11,7 @@ func addAlertMigrations(mg *Migrator) {
|
||||
Columns: []*Column{
|
||||
{Name: "id", Type: DB_BigInt, IsPrimaryKey: true, IsAutoIncrement: true},
|
||||
{Name: "dashboard_id", Type: DB_BigInt, Nullable: false},
|
||||
//{Name: "datasource_id", Type: DB_BigInt, Nullable: false},
|
||||
{Name: "datasource_id", Type: DB_BigInt, Nullable: false},
|
||||
{Name: "panel_id", Type: DB_BigInt, Nullable: false},
|
||||
{Name: "org_id", Type: DB_BigInt, Nullable: false},
|
||||
{Name: "query", Type: DB_Text, Nullable: false},
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/services/sqlstore/sqlutil"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
//"github.com/grafana/grafana/pkg/log"
|
||||
)
|
||||
|
||||
var indexTypes = []string{"Unknown", "INDEX", "UNIQUE INDEX"}
|
||||
@@ -28,7 +29,7 @@ func TestMigrations(t *testing.T) {
|
||||
sqlutil.CleanDB(x)
|
||||
|
||||
mg := NewMigrator(x)
|
||||
//mg.LogLevel = log.DEBUG
|
||||
//mg.LogLevel = log.ERROR
|
||||
AddMigrations(mg)
|
||||
|
||||
err = mg.Start()
|
||||
|
||||
Reference in New Issue
Block a user