[MM-31085] Create a db init command to initialize the database (#16489)

Automatic Merge
Этот коммит содержится в:
Miguel de la Cruz
2020-12-16 20:45:17 +01:00
коммит произвёл GitHub
родитель 6a3bc50f13
Коммит e057e5b10b
6 изменённых файлов: 148 добавлений и 27 удалений

Просмотреть файл

@@ -6,7 +6,6 @@ package config
import (
"bytes"
"encoding/json"
"strings"
"sync"
"github.com/mattermost/mattermost-server/v5/model"
@@ -83,7 +82,7 @@ func NewStoreFromBacking(backingStore BackingStore, customDefaults *model.Config
}
func getBackingStore(dsn string, watch bool) (BackingStore, error) {
if strings.HasPrefix(dsn, "mysql://") || strings.HasPrefix(dsn, "postgres://") {
if IsDatabaseDSN(dsn) {
return NewDatabaseStore(dsn)
}