mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-24 13:43:12 +02:00
Fix db migration error check
This commit is contained in:
parent
72f4783e34
commit
c1fe8c3c0d
@ -46,7 +46,7 @@ func (s *SQLStore) Migrate() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
err = m.Up()
|
err = m.Up()
|
||||||
if err != nil && errors.Is(err, migrate.ErrNoChange) {
|
if err != nil && !errors.Is(err, migrate.ErrNoChange) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ func New(dbType, connectionString string) (*SQLStore, error) {
|
|||||||
|
|
||||||
err = db.Ping()
|
err = db.Ping()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(`Database Ping failed`)
|
log.Printf(`Database Ping failed: %v`, err)
|
||||||
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -39,7 +39,7 @@ func New(dbType, connectionString string) (*SQLStore, error) {
|
|||||||
|
|
||||||
err = store.Migrate()
|
err = store.Migrate()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(`Table creation failed`)
|
log.Printf(`Table creation / migration failed: %v`, err)
|
||||||
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user