Alerting: Store alertmanager configuration history in a separate table in the database (#60492)

* Update config store to split between active and history tables

* Migrations to fix up indexes

* Implement migration from old format to new

* Move add migrations call

* Delete duplicated rows

* Explicitly map fields

* Quote the column name because it's a reserved word

* Lift migrations to top

* Use XORM for nearly everything, avoid any non trivial raw SQL

* Touch up indexes and zero out IDs on move

* Drop TODO that's already completed

* Fix assignment of IDs
This commit is contained in:
Alexander Weaver
2023-01-04 10:43:26 -06:00
committed by GitHub
parent c74d86ca27
commit 0e7640475f
3 changed files with 104 additions and 100 deletions
@@ -35,6 +35,7 @@ func AddTablesMigrations(mg *migrator.Migrator) {
AddAlertImageMigrations(mg)
AddAlertmanagerConfigHistoryMigrations(mg)
ExtractAlertmanagerConfigurationHistoryMigration(mg)
}
// AddAlertDefinitionMigrations should not be modified.