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 (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/hashicorp/go-multierror"
|
|
||||||
"os"
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/hashicorp/go-multierror"
|
||||||
|
|
||||||
"github.com/golang-migrate/migrate/v4/database"
|
"github.com/golang-migrate/migrate/v4/database"
|
||||||
iurl "github.com/golang-migrate/migrate/v4/internal/url"
|
iurl "github.com/golang-migrate/migrate/v4/internal/url"
|
||||||
"github.com/golang-migrate/migrate/v4/source"
|
"github.com/golang-migrate/migrate/v4/source"
|
||||||
|
@ -805,6 +806,7 @@ func (m *Migrate) versionExists(version uint) (result error) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m.logErr(fmt.Errorf("no migration found for version %d", version))
|
||||||
return os.ErrNotExist
|
return os.ErrNotExist
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue