From bb05989e4306a38e1afd6e2e1c2b8b751f3eb658 Mon Sep 17 00:00:00 2001 From: Arve Knudsen Date: Wed, 18 Mar 2020 17:59:42 +0100 Subject: [PATCH] SQLStore: Add migration for adding index on annotation.alert_id (#22876) --- pkg/services/sqlstore/migrations/annotation_mig.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/services/sqlstore/migrations/annotation_mig.go b/pkg/services/sqlstore/migrations/annotation_mig.go index 3ec5df841ed..fb7fe9f5573 100644 --- a/pkg/services/sqlstore/migrations/annotation_mig.go +++ b/pkg/services/sqlstore/migrations/annotation_mig.go @@ -145,6 +145,10 @@ func addAnnotationMig(mg *Migrator) { mg.AddMigration("Remove index org_id_epoch_epoch_end from annotation table", NewDropIndexMigration(table, &Index{ Cols: []string{"org_id", "epoch", "epoch_end"}, Type: IndexType, })) + + mg.AddMigration("Add index for alert_id on annotation table", NewAddIndexMigration(table, &Index{ + Cols: []string{"alert_id"}, Type: IndexType, + })) } type AddMakeRegionSingleRowMigration struct {