Files
grafana/pkg/storage/unified/sql/db/migrations/migrator.go
T
Serge Zaitsev 694b9dfe50 Chore: Replace xorm.io/xorm imports (#104458)
* replace xorm.io/xorm imports

* replace xorm from other go.mod files

* clean up workspace

* nolint does not make sense anymore as it is not a module

* try if nolint directive helps

* use nolint:all for xorm

* add more nolints

* try to skip xorm in linter config

* exclude xorm differently

* retrigger ci
2025-05-02 17:13:01 +02:00

23 lines
522 B
Go

package migrations
import (
"context"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"github.com/grafana/grafana/pkg/setting"
)
func MigrateResourceStore(_ context.Context, engine *xorm.Engine, cfg *setting.Cfg) error {
// TODO: use the context.Context
mg := migrator.NewScopedMigrator(engine, cfg, "resource")
mg.AddCreateMigration()
initResourceTables(mg)
// since it's a new feature enable migration locking by default
return mg.Start(true, 0)
}