diff --git a/cmd/migrate_sql.go b/cmd/migrate_sql.go index d09489bde3..50b687d447 100644 --- a/cmd/migrate_sql.go +++ b/cmd/migrate_sql.go @@ -6,6 +6,8 @@ package cmd import ( "github.com/spf13/cobra" + "github.com/ory/x/popx" + "github.com/ory/hydra/v2/cmd/cli" "github.com/ory/hydra/v2/driver" "github.com/ory/x/configx" @@ -42,3 +44,15 @@ Before running this command on an existing database, create a back up!`, return cmd } + +func NewMigrateSQLDownCmd(slOpts []servicelocatorx.Option, dOpts []driver.OptionsModifier, cOpts []configx.OptionModifier) *cobra.Command { + return popx.NewMigrateSQLDownCmd("hydra", cli.NewHandler(slOpts, dOpts, cOpts).Migration.MigrateSQLDown) +} + +func NewMigrateSQLStatusCmd(slOpts []servicelocatorx.Option, dOpts []driver.OptionsModifier, cOpts []configx.OptionModifier) *cobra.Command { + return popx.NewMigrateSQLStatusCmd("hydra", cli.NewHandler(slOpts, dOpts, cOpts).Migration.MigrateStatus) +} + +func NewMigrateSQLUpCmd(slOpts []servicelocatorx.Option, dOpts []driver.OptionsModifier, cOpts []configx.OptionModifier) *cobra.Command { + return popx.NewMigrateSQLUpCmd("hydra", cli.NewHandler(slOpts, dOpts, cOpts).Migration.MigrateSQLUp) +} diff --git a/cmd/migrate_sql_down.go b/cmd/migrate_sql_down.go deleted file mode 100644 index b2c4b37cc7..0000000000 --- a/cmd/migrate_sql_down.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © 2022 Ory Corp -// SPDX-License-Identifier: Apache-2.0 - -package cmd - -import ( - "github.com/spf13/cobra" - - "github.com/ory/hydra/v2/cmd/cli" - "github.com/ory/hydra/v2/driver" - "github.com/ory/x/configx" - "github.com/ory/x/popx" - "github.com/ory/x/servicelocatorx" -) - -func NewMigrateSQLDownCmd(slOpts []servicelocatorx.Option, dOpts []driver.OptionsModifier, cOpts []configx.OptionModifier) *cobra.Command { - return popx.NewMigrateSQLDownCmd("hydra", cli.NewHandler(slOpts, dOpts, cOpts).Migration.MigrateSQLDown) -} diff --git a/cmd/migrate_sql_status.go b/cmd/migrate_sql_status.go deleted file mode 100644 index 8e4d6768ae..0000000000 --- a/cmd/migrate_sql_status.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © 2022 Ory Corp -// SPDX-License-Identifier: Apache-2.0 - -package cmd - -import ( - "github.com/spf13/cobra" - - "github.com/ory/hydra/v2/cmd/cli" - "github.com/ory/hydra/v2/driver" - "github.com/ory/x/configx" - "github.com/ory/x/popx" - "github.com/ory/x/servicelocatorx" -) - -func NewMigrateSQLStatusCmd(slOpts []servicelocatorx.Option, dOpts []driver.OptionsModifier, cOpts []configx.OptionModifier) *cobra.Command { - return popx.NewMigrateSQLStatusCmd("hydra", cli.NewHandler(slOpts, dOpts, cOpts).Migration.MigrateStatus) -} diff --git a/cmd/migrate_sql_up.go b/cmd/migrate_sql_up.go deleted file mode 100644 index a07afd383f..0000000000 --- a/cmd/migrate_sql_up.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © 2022 Ory Corp -// SPDX-License-Identifier: Apache-2.0 - -package cmd - -import ( - "github.com/spf13/cobra" - - "github.com/ory/hydra/v2/cmd/cli" - "github.com/ory/hydra/v2/driver" - "github.com/ory/x/configx" - "github.com/ory/x/popx" - "github.com/ory/x/servicelocatorx" -) - -func NewMigrateSQLUpCmd(slOpts []servicelocatorx.Option, dOpts []driver.OptionsModifier, cOpts []configx.OptionModifier) *cobra.Command { - return popx.NewMigrateSQLDownCmd("hydra", cli.NewHandler(slOpts, dOpts, cOpts).Migration.MigrateSQLUp) -}