Do not shadow 'asset'
This commit is contained in:
parent
9a8dc490ef
commit
3dc4599329
@ -68,12 +68,12 @@ 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, i))
|
script, err := asset(fmt.Sprintf(o.AssetPrefix+fileFormat, i))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ErrUpdatesMissing
|
return ErrUpdatesMissing
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = tx.Exec(string(asset))
|
_, err = tx.Exec(string(script))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user