mirror of https://github.com/status-im/migrate.git
Improve error message in case no migration is found (#158)
* Improve error message in case no migration is found * Return similar error * Just log the error * Fix error message
This commit is contained in:
parent
b6df2cab18
commit
3dc81826fd
|
@ -7,11 +7,12 @@ package migrate
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/hashicorp/go-multierror"
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/go-multierror"
|
||||
|
||||
"github.com/golang-migrate/migrate/v4/database"
|
||||
iurl "github.com/golang-migrate/migrate/v4/internal/url"
|
||||
"github.com/golang-migrate/migrate/v4/source"
|
||||
|
@ -805,6 +806,7 @@ func (m *Migrate) versionExists(version uint) (result error) {
|
|||
return err
|
||||
}
|
||||
|
||||
m.logErr(fmt.Errorf("no migration found for version %d", version))
|
||||
return os.ErrNotExist
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue