diff --git a/cmd.go b/cmd.go index 88fd97c..0065791 100644 --- a/cmd.go +++ b/cmd.go @@ -2,7 +2,6 @@ package main import ( "flag" - // "fmt" "os" ) diff --git a/migrate.go b/migrate.go index 7a2a624..93fe57b 100644 --- a/migrate.go +++ b/migrate.go @@ -56,7 +56,7 @@ func runMigrations(conf *DBConf, migrationsDir string, target int) { } fmt.Printf("goose: migrating db configuration '%v', current version: %d, target: %d\n", - conf.Name, mm.Versions[0], mm.Versions[len(mm.Versions)-1]) + conf.Name, current, target) for _, v := range mm.Versions { @@ -127,7 +127,7 @@ func versionFilter(v, current, target int) bool { } if target < current { - return v <= current && v >= target + return v <= current && v > target } return false