Skip to content

Commit

Permalink
cli: adds an admin migrate-database command
Browse files Browse the repository at this point in the history
convenient to have when running in HA mode for example
  • Loading branch information
marefr committed Sep 25, 2018
1 parent 90595ff commit c5d0120
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkg/cmd/grafana-cli/commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,21 @@ var adminCommands = []cli.Command{
},
},
},
{
Name: "migrate-database",
Usage: "Migrate database to the latest version",
Action: runDbCommand(migrateDatabaseCommand),
Flags: []cli.Flag{
cli.StringFlag{
Name: "homepath",
Usage: "path to grafana install/home path, defaults to working directory",
},
cli.StringFlag{
Name: "config",
Usage: "path to config file",
},
},
},
}

var Commands = []cli.Command{
Expand Down
4 changes: 4 additions & 0 deletions pkg/cmd/grafana-cli/commands/reset_password_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ func resetPasswordCommand(c CommandLine) error {

return nil
}

func migrateDatabaseCommand(c CommandLine) error {
return nil
}

0 comments on commit c5d0120

Please sign in to comment.