Update documentation to explicitly state we should not be putting migrations behind feature flags (#48663)

This commit is contained in:
Jeff Levin
2022-05-03 15:10:59 -08:00
committed by GitHub
parent b88644cb83
commit 38fc0c68e4
2 changed files with 5 additions and 0 deletions

View File

@@ -99,6 +99,8 @@ To add a migration:
- In the `AddMigrations` function, find the `addXxxMigration` function for the service you want to create a migration for.
- At the end of the `addXxxMigration` function, register your migration:
> **NOTE:** Putting migrations behind feature flags is no longer recommended as it may cause the migration skip integration testing.
[Example](https://github.com/grafana/grafana/blob/00d0640b6e778ddaca021670fe851fe00982acf2/pkg/services/sqlstore/migrations/migrations.go#L55-L70)
### Implement `DatabaseMigrator`