diff --git a/pkg/cmd/grafana-cli/commands/commands.go b/pkg/cmd/grafana-cli/commands/commands.go index 9e95f5220f6..f55209ac1d6 100644 --- a/pkg/cmd/grafana-cli/commands/commands.go +++ b/pkg/cmd/grafana-cli/commands/commands.go @@ -154,6 +154,11 @@ var adminCommands = []*cli.Command{ Usage: "Non interactive mode. Just run the migration.", Value: false, }, + &cli.StringFlag{ + Name: "namespace", + Usage: "That's the Unified Storage Namespace.", + Value: "default", + }, }, }, }, diff --git a/pkg/cmd/grafana-cli/commands/datamigrations/to_unified_storage.go b/pkg/cmd/grafana-cli/commands/datamigrations/to_unified_storage.go index ad3d5979d74..8da13ca5341 100644 --- a/pkg/cmd/grafana-cli/commands/datamigrations/to_unified_storage.go +++ b/pkg/cmd/grafana-cli/commands/datamigrations/to_unified_storage.go @@ -32,7 +32,9 @@ import ( // ToUnifiedStorage converts dashboards+folders into unified storage func ToUnifiedStorage(c utils.CommandLine, cfg *setting.Cfg, sqlStore db.DB) error { - namespace := "default" // TODO... from command line + // Take namespace from command line + namespace := c.String("namespace") + ns, err := authlib.ParseNamespace(namespace) if err != nil { return err