Annotation: Optionally allow storing longer annotation tags (#54754)

* Annotation: Optionally allow longer annotation tags

* Do not accept configuration lower than today's default (500)

* Apply suggestion from code review
This commit is contained in:
Sofia Papagiannaki
2022-09-23 13:04:41 +03:00
committed by GitHub
parent 883c7a802b
commit d0e7765c6a
10 changed files with 101 additions and 22 deletions

View File

@@ -178,6 +178,10 @@ func addAnnotationMig(mg *Migrator) {
mg.AddMigration("Add index for alert_id on annotation table", NewAddIndexMigration(table, &Index{
Cols: []string{"alert_id"}, Type: IndexType,
}))
mg.AddMigration("Increase tags column to length 4096", NewRawSQLMigration("").
Postgres("ALTER TABLE annotation ALTER COLUMN tags TYPE VARCHAR(4096);").
Mysql("ALTER TABLE annotation MODIFY tags VARCHAR(4096);"))
}
type AddMakeRegionSingleRowMigration struct {