From 88db7b1a3e0068beb468e5bdf9afb34fbc58a434 Mon Sep 17 00:00:00 2001 From: Riccardo Montagnin Date: Thu, 24 Nov 2022 10:57:56 -0500 Subject: [PATCH] fix: fixed package name --- cmd/migrate/cmd.go | 3 +-- cmd/migrate/v4/migrate.go | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/migrate/cmd.go b/cmd/migrate/cmd.go index 0741bf3e..bd48b6ad 100644 --- a/cmd/migrate/cmd.go +++ b/cmd/migrate/cmd.go @@ -33,8 +33,7 @@ func NewMigrateCmd(appName string, parseConfig *parsecmdtypes.Config) *cobra.Com Use: "migrate [to-version]", Short: "Perform the migrations from the current version to the specified one", Long: `Migrates all the necessary things (config file, database, etc) from the current version to the new one. -If you are upgrading from a very old version to the latest one, migrations must be performed in order -(eg. to migrate from v1 to v3 you need to do v1 -> v2 and then v2 -> v3). +Note that migrations must be performed in order: to migrate from vX to vX+2 you need to do vX -> vX+1 and then vX+1 -> vX+2. `, Example: fmt.Sprintf("%s migrate v3", appName), Args: cobra.RangeArgs(0, 1), diff --git a/cmd/migrate/v4/migrate.go b/cmd/migrate/v4/migrate.go index 9dfa3a64..53a5d15a 100644 --- a/cmd/migrate/v4/migrate.go +++ b/cmd/migrate/v4/migrate.go @@ -8,7 +8,7 @@ import ( "gopkg.in/yaml.v3" - v2 "github.com/forbole/juno/v3/cmd/migrate/v3" + v3 "github.com/forbole/juno/v3/cmd/migrate/v3" databaseconfig "github.com/forbole/juno/v3/database/config" "github.com/forbole/juno/v3/types/config" ) @@ -41,7 +41,7 @@ func RunMigration(parseConfig *parsecmdtypes.Config) error { } func migrateConfig() (Config, error) { - cfg, err := v2.GetConfig() + cfg, err := v3.GetConfig() if err != nil { return Config{}, fmt.Errorf("error while reading v2 config: %s", err) }