Alerting: Change rule migration to be based on feature flag (#33792)

makes it so the feature flag can be turned on off, and the migration will be cleared and rerun. All existing NG alert rules, configuration settings, etc are removed when disabling the feature flag.
for https://github.com/grafana/alerting-squad/issues/142

Co-authored-by: Sofia Papagiannaki <sofia@grafana.com>
This commit is contained in:
Kyle BrandtandSofia Papagiannaki authored and GitHub committed 2021-05-11 08:08:39 -04:00
1 parent ac44a679a7
commit dc3e17ba5b
5 files changed
+95 -8

No files matched your search

+1 -1
View File
@@ -85,7 +85,7 @@ func (ss *SQLStore) Init() error {
dialect = ss.Dialect
if !ss.dbCfg.SkipMigrations {
migrator := migrator.NewMigrator(ss.engine)
migrator := migrator.NewMigrator(ss.engine, ss.Cfg)
migrations.AddMigrations(migrator)
for _, descriptor := range registry.GetServices() {