1
0
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:
Chen-I Lim 2020-10-22 08:41:47 -07:00
parent 72f4783e34
commit c1fe8c3c0d
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ func (s *SQLStore) Migrate() error {
}
err = m.Up()
if err != nil && errors.Is(err, migrate.ErrNoChange) {
if err != nil && !errors.Is(err, migrate.ErrNoChange) {
return err
}

View File

@ -27,7 +27,7 @@ func New(dbType, connectionString string) (*SQLStore, error) {
err = db.Ping()
if err != nil {
log.Println(`Database Ping failed`)
log.Printf(`Database Ping failed: %v`, err)
return nil, err
}
@ -39,7 +39,7 @@ func New(dbType, connectionString string) (*SQLStore, error) {
err = store.Migrate()
if err != nil {
log.Println(`Table creation failed`)
log.Printf(`Table creation / migration failed: %v`, err)
return nil, err
}