MM-55450: Handle error in db migrate phase (#25430)
We were not handling the error from initConnection. https://mattermost.atlassian.net/browse/MM-55450 ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
fee6606606
Коммит
864046f782
@@ -37,7 +37,10 @@ func NewMigrator(settings model.SqlSettings, dryRun bool) (*Migrator, error) {
|
|||||||
wgMonitor: &sync.WaitGroup{},
|
wgMonitor: &sync.WaitGroup{},
|
||||||
}
|
}
|
||||||
|
|
||||||
ss.initConnection()
|
err := ss.initConnection()
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("error in initializing connection: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
ver, err := ss.GetDbVersion(true)
|
ver, err := ss.GetDbVersion(true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user