Fix an issue where running multiple migrations fails
This commit is contained in:
parent
adc0a5ad10
commit
9a8dc490ef
@ -68,7 +68,7 @@ func Migrate(db *sql.DB, version int, o Options, asset AssetFunc) error {
|
|||||||
defer tx.Rollback()
|
defer tx.Rollback()
|
||||||
|
|
||||||
for i := v + 1; i <= version; i++ {
|
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 {
|
if err != nil {
|
||||||
return ErrUpdatesMissing
|
return ErrUpdatesMissing
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user