You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks as though the migrateCommand arguments are not working.
If I send journey --url cassandra://127.0.0.1:9042/keyspace --path ./migrations migrate m -1 it looks as though relativeNInt, err := strconv.Atoi(relativeN) is trying to parse ctx.Args().First(), where the correct argument should be ctx.Args()[2].
So change the following code:
Action: func(ctx *cli.Context) error {
relativeN := ctx.Args().First()
relativeNInt, err := strconv.Atoi(relativeN)
if err != nil {
logErr(err).Fatal("Unable to parse param <n>")
}
log.Infof("Applying %d migrations", relativeNInt)
pipe := pipep.New()
go migrate.Migrate(pipe, ctx.GlobalString("url"), ctx.GlobalString("path"), relativeNInt)
ok := readPipe(pipe)
if !ok {
os.Exit(1)
}
logCurrentVersion(ctx.GlobalString("url"), ctx.GlobalString("path"))
return nil
},
to:
Action: func(ctx *cli.Context) error {
relativeN := ctx.Args()[2]
relativeNInt, err := strconv.Atoi(relativeN)
if err != nil {
logErr(err).Fatal("Unable to parse param <n>")
}
log.Infof("Applying %d migrations", relativeNInt)
pipe := pipep.New()
go migrate.Migrate(pipe, ctx.GlobalString("url"), ctx.GlobalString("path"), relativeNInt)
ok := readPipe(pipe)
if !ok {
os.Exit(1)
}
logCurrentVersion(ctx.GlobalString("url"), ctx.GlobalString("path"))
return nil
},
The text was updated successfully, but these errors were encountered:
Could you please make sure you have the latest version of github.com/db-journey/journey?
It looks like a duplicate of db-journey/journey#4
Please confirm
It looks as though the migrateCommand arguments are not working.
If I send
journey --url cassandra://127.0.0.1:9042/keyspace --path ./migrations migrate m -1
it looks as thoughrelativeNInt, err := strconv.Atoi(relativeN)
is trying to parsectx.Args().First()
, where the correct argument should bectx.Args()[2]
.So change the following code:
to:
The text was updated successfully, but these errors were encountered: