Commit e1e05cad by Karine Valença Committed by GitHub

Database: Adds new indices to alert_notification_state and alert_rule_tag tables (#28166)

Add non-unique indices to alert_notification_state and alert_rule_tag tables for 
column alert_id.

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

Fixes #22890
parent 0a58ecba
......@@ -175,4 +175,12 @@ func addAlertMigrations(mg *Migrator) {
// change column type of alert.settings
mg.AddMigration("alter alert.settings to mediumtext", NewRawSqlMigration("").
Mysql("ALTER TABLE alert MODIFY settings MEDIUMTEXT;"))
mg.AddMigration("Add non-unique index alert_notification_state_alert_id", NewAddIndexMigration(alert_notification_state, &Index{
Cols: []string{"alert_id"}, Type: IndexType,
}))
mg.AddMigration("Add non-unique index alert_rule_tag_alert_id", NewAddIndexMigration(alertRuleTagTable, &Index{
Cols: []string{"alert_id"}, Type: IndexType,
}))
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment