Alerting: Fix saving of screenshots uploaded with a signed url (#53933)
The URL of screenshots uploaded to external image storages can be optionally signed, resulting in a long string (800+ chars).
This commit is contained in:
@@ -396,6 +396,11 @@ func AddAlertImageMigrations(mg *migrator.Migrator) {
|
||||
{Cols: []string{"token"}, Type: migrator.UniqueIndex},
|
||||
},
|
||||
}
|
||||
|
||||
mg.AddMigration("create alert_image table", migrator.NewAddTableMigration(imageTable))
|
||||
mg.AddMigration("add unique index on token to alert_image table", migrator.NewAddIndexMigration(imageTable, imageTable.Indices[0]))
|
||||
|
||||
mg.AddMigration("support longer URLs in alert_image table", migrator.NewRawSQLMigration("").
|
||||
Postgres("ALTER TABLE alert_image ALTER COLUMN url TYPE VARCHAR(2048);").
|
||||
Mysql("ALTER TABLE alert_image MODIFY url VARCHAR(2048) NOT NULL;"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user