CLI: Upgrade github.com/urfave/cli from v1 to v2 #3168

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2024-12-05 17:15:59 +01:00
parent 3b61aba85d
commit 9eef183323
103 changed files with 1961 additions and 1642 deletions

View File

@@ -9,7 +9,7 @@ import (
"time"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"github.com/urfave/cli/v2"
"github.com/photoprism/photoprism/internal/config"
"github.com/photoprism/photoprism/internal/entity/migrate"
@@ -31,13 +31,15 @@ var MigrationsRunCommand = cli.Command{
Usage: "Executes database schema migrations",
ArgsUsage: "[migrations...]",
Flags: []cli.Flag{
cli.BoolFlag{
Name: "failed, f",
Usage: "run previously failed migrations",
&cli.BoolFlag{
Name: "failed",
Aliases: []string{"f"},
Usage: "run previously failed migrations",
},
cli.BoolFlag{
Name: "trace, t",
Usage: "show trace logs for debugging",
&cli.BoolFlag{
Name: "trace",
Aliases: []string{"t"},
Usage: "show trace logs for debugging",
},
},
Action: migrationsRunAction,
@@ -47,9 +49,9 @@ var MigrationsRunCommand = cli.Command{
var MigrationsCommands = cli.Command{
Name: "migrations",
Usage: "Database schema migration subcommands",
Subcommands: []cli.Command{
MigrationsStatusCommand,
MigrationsRunCommand,
Subcommands: []*cli.Command{
&MigrationsStatusCommand,
&MigrationsRunCommand,
},
}