mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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
This commit is contained in:
parent
0a58ecbacd
commit
e1e05cad7d
@ -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,
|
||||
}))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user