Skip to content

Commit

Permalink
use new code to start a repo migration
Browse files Browse the repository at this point in the history
  • Loading branch information
zaibon committed Apr 3, 2021
1 parent 4fac5e3 commit 2455742
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/commands/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,9 @@ var repoMigrateCmd = &cmds.Command{

fmt.Println("Found outdated fs-repo, starting migration.")

err = migrate.RunMigration(fsrepo.RepoVersion, allowDowngrade)
// Fetch migrations from current distribution, or location from environ
fetcher := migrate.NewHttpFetcher(migrate.GetDistPathEnv(migrate.CurrentIpfsDist), "", "go-ipfs", 0)
err = migrate.RunMigration(cctx.Context(), fetcher, fsrepo.RepoVersion, "", allowDowngrade)
if err != nil {
fmt.Println("The migrations of fs-repo failed:")
fmt.Printf(" %s\n", err)
Expand Down

0 comments on commit 2455742

Please sign in to comment.