Merge branch 'query_part_refactor' into alerting

Conflicts:
	pkg/services/sqlstore/migrations/alert_mig.go
	pkg/services/sqlstore/migrations/heartbeat_mig.go
This commit is contained in:
Torkel Ödegaard
2016-08-15 17:54:42 +02:00
11 changed files with 136 additions and 101 deletions

View File

@@ -62,6 +62,5 @@ func addAlertMigrations(mg *Migrator) {
}
mg.AddMigration("create alert_notification table v1", NewAddTableMigration(alert_notification))
mg.AddMigration("add index alert_notification org_id & name", NewAddIndexMigration(alert_notification, alert_notification.Indices[0]))
}

View File

@@ -12,7 +12,6 @@ func addAnnotationMig(mg *Migrator) {
{Name: "org_id", Type: DB_BigInt, Nullable: false},
{Name: "alert_id", Type: DB_BigInt, Nullable: true},
{Name: "user_id", Type: DB_BigInt, Nullable: true},
{Name: "panel_link_id", Type: DB_NVarchar, Length: 32, Nullable: false},
{Name: "type", Type: DB_NVarchar, Length: 25, Nullable: false},
{Name: "title", Type: DB_Text, Nullable: false},
{Name: "text", Type: DB_Text, Nullable: false},
@@ -25,7 +24,6 @@ func addAnnotationMig(mg *Migrator) {
Indices: []*Index{
{Cols: []string{"org_id", "alert_id"}, Type: IndexType},
{Cols: []string{"org_id", "type"}, Type: IndexType},
{Cols: []string{"org_id", "panel_link_id"}, Type: IndexType},
{Cols: []string{"timestamp"}, Type: IndexType},
},
}
@@ -35,6 +33,5 @@ func addAnnotationMig(mg *Migrator) {
// create indices
mg.AddMigration("add index annotation org_id & alert_id ", NewAddIndexMigration(table, table.Indices[0]))
mg.AddMigration("add index annotation org_id & type", NewAddIndexMigration(table, table.Indices[1]))
mg.AddMigration("add index annotation org_id & panel_link_id ", NewAddIndexMigration(table, table.Indices[2]))
mg.AddMigration("add index annotation timestamp", NewAddIndexMigration(table, table.Indices[3]))
mg.AddMigration("add index annotation timestamp", NewAddIndexMigration(table, table.Indices[2]))
}