Fix an issue where running multiple migrations fails

This commit is contained in:
Nise Void 2017-04-06 13:58:42 +02:00
parent adc0a5ad10
commit 9a8dc490ef

View File

@ -68,7 +68,7 @@ func Migrate(db *sql.DB, version int, o Options, asset AssetFunc) error {
defer tx.Rollback()
for i := v + 1; i <= version; i++ {
asset, err := asset(fmt.Sprintf(o.AssetPrefix+fileFormat, version))
asset, err := asset(fmt.Sprintf(o.AssetPrefix+fileFormat, i))
if err != nil {
return ErrUpdatesMissing
}