You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: clients_reset.go
    path of file: ./repos/photoprism/internal/commands
    
    the code of the file until where you have to start completion: package commands

import (
	"fmt"

	"github.com/manifoldco/promptui"
	"github.com/sirupsen/logrus"
	"github.com/urfave/cli"

	"github.com/photoprism/photoprism/internal/config"
	"github.com/photoprism/photoprism/internal/entity"
)

// ClientsResetCommand configures the command name, flags, and action.
var ClientsResetCommand = cli.Command{
	Name:  "reset",
	Usage: "Removes all registered client applications",
	Flags: []cli.Flag{
		cli.BoolFlag{
			Name:  "trace, t",
			Usage: "show trace logs for debugging",
		},
		cli
    
func clientsResetAction(ctx *cli.Context) error {
	return CallWithDependencies(ctx, func(conf *config.Config) error {
		confirmed := ctx.Bool("yes")

		// Show prompt?
		if !confirmed {
			actionPrompt := promptui.Prompt{
				Label:     fmt.Sprintf("Reset the client database to a clean state?"),
				IsConfirm: true,
			}

			if _, err := actionPrompt.Run(); err != nil {
				return nil
			}
		}

		if ctx.Bool("trace") {
			log.SetLevel(logrus.TraceLevel)
			log.Infoln("reset: enabled trace mode")
		}

		db := conf.Db()

		// Drop existing auth_clients table.
		if err := db.DropTableIfExists(entity.Client{}).Error; err != nil {
			return err
		}

		// Re-create auth_clients.
		if err := db.CreateTable(entity.Client{}).Error; err != nil {
			return err
		}

		log.Infof("the client database has been recreated and is now in a clean state")

		return nil
	})
}