mirror of
https://github.com/grafana/grafana.git
synced 2024-12-23 07:34:08 -06:00
Alerting: Fix annotation state migration to retain nullability on MySQL (#96640)
This commit is contained in:
parent
5a84048b9a
commit
2364299a8c
@ -184,13 +184,13 @@ func addAnnotationMig(mg *Migrator) {
|
|||||||
Postgres("ALTER TABLE annotation ALTER COLUMN tags TYPE VARCHAR(4096);").
|
Postgres("ALTER TABLE annotation ALTER COLUMN tags TYPE VARCHAR(4096);").
|
||||||
Mysql("ALTER TABLE annotation MODIFY tags VARCHAR(4096);"))
|
Mysql("ALTER TABLE annotation MODIFY tags VARCHAR(4096);"))
|
||||||
|
|
||||||
mg.AddMigration("Increase prev_state column to length 40", NewRawSQLMigration("").
|
mg.AddMigration("Increase prev_state column to length 40 not null", NewRawSQLMigration("").
|
||||||
Postgres("ALTER TABLE annotation ALTER COLUMN prev_state TYPE VARCHAR(40);").
|
Postgres("ALTER TABLE annotation ALTER COLUMN prev_state TYPE VARCHAR(40);"). // Does not modify nullability.
|
||||||
Mysql("ALTER TABLE annotation MODIFY prev_state VARCHAR(40);"))
|
Mysql("ALTER TABLE annotation MODIFY prev_state VARCHAR(40) NOT NULL;"))
|
||||||
|
|
||||||
mg.AddMigration("Increase new_state column to length 40", NewRawSQLMigration("").
|
mg.AddMigration("Increase new_state column to length 40 not null", NewRawSQLMigration("").
|
||||||
Postgres("ALTER TABLE annotation ALTER COLUMN new_state TYPE VARCHAR(40);").
|
Postgres("ALTER TABLE annotation ALTER COLUMN new_state TYPE VARCHAR(40);"). // Does not modify nullability.
|
||||||
Mysql("ALTER TABLE annotation MODIFY new_state VARCHAR(40);"))
|
Mysql("ALTER TABLE annotation MODIFY new_state VARCHAR(40) NOT NULL;"))
|
||||||
}
|
}
|
||||||
|
|
||||||
type AddMakeRegionSingleRowMigration struct {
|
type AddMakeRegionSingleRowMigration struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user