Files
zitadel/backend/cmd/prepare/prepare.go

36 lines
1003 B
Go
Raw Normal View History

2025-02-13 13:49:55 +01:00
package prepare
import (
"github.com/spf13/cobra"
2025-02-23 17:16:23 +01:00
2025-02-17 07:55:12 +01:00
step001 "github.com/zitadel/zitadel/backend/cmd/prepare/001"
2025-02-13 13:49:55 +01:00
)
2025-02-17 07:55:12 +01:00
var (
// PrepareCmd represents the prepare command
PrepareCmd = &cobra.Command{
Use: "prepare",
Short: "Prepares external services before starting Zitadel",
// Long: `A longer description that spans multiple lines and likely contains examples
// and usage of using your command. For example:
2025-02-13 13:49:55 +01:00
2025-02-17 07:55:12 +01:00
// Cobra is a CLI library for Go that empowers applications.
// This application is a tool to generate the needed files
// to quickly create a Cobra application.`,
Run: func(cmd *cobra.Command, args []string) {
2025-03-04 20:00:09 +01:00
// var err error
// configuration.Client, err = configuration.Database.Connect(cmd.Context())
// if err != nil {
// panic(err)
// }
2025-02-17 07:55:12 +01:00
defer configuration.Client.Close(cmd.Context())
if err := (&step001.Step001{Database: configuration.Client}).Migrate(cmd.Context()); err != nil {
panic(err)
}
},
}
)
2025-02-13 13:49:55 +01:00
2025-02-17 07:55:12 +01:00
type Migration interface {
2025-02-13 13:49:55 +01:00
}