mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
22 lines
442 B
Go
22 lines
442 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/formancehq/go-libs/bun/bunmigrate"
|
|
|
|
storage "github.com/formancehq/reconciliation/internal/storage/migrations"
|
|
"github.com/spf13/cobra"
|
|
"github.com/uptrace/bun"
|
|
)
|
|
|
|
var (
|
|
autoMigrateFlag = "auto-migrate"
|
|
)
|
|
|
|
func newMigrate() *cobra.Command {
|
|
return bunmigrate.NewDefaultCommand(Migrate)
|
|
}
|
|
|
|
func Migrate(cmd *cobra.Command, args []string, db *bun.DB) error {
|
|
return storage.Migrate(cmd.Context(), db)
|
|
}
|