[MM-25673] Upgrades and migrations to start using master gorp (#14823)

Database changes needed to reflect gorp master changes
Этот коммит содержится в:
Mario de Frutos Dieguez
2020-08-18 10:43:56 +02:00
коммит произвёл GitHub
родитель 0302e0f477
Коммит f619de2c83
56 изменённых файлов: 461 добавлений и 4889 удалений

5
vendor/github.com/mattermost/gorp/db.go сгенерированный поставляемый
Просмотреть файл

@@ -12,7 +12,6 @@
package gorp
import (
"bytes"
"context"
"database/sql"
"database/sql/driver"
@@ -100,7 +99,7 @@ func (m *DbMap) CreateIndex() error {
func (m *DbMap) createIndexImpl(dialect reflect.Type,
table *TableMap,
index *IndexMap) error {
s := bytes.Buffer{}
s := strings.Builder{}
s.WriteString("create")
if index.Unique {
s.WriteString(" unique")
@@ -133,7 +132,7 @@ func (t *TableMap) DropIndex(name string) error {
dialect := reflect.TypeOf(t.dbmap.Dialect)
for _, idx := range t.indexes {
if idx.IndexName == name {
s := bytes.Buffer{}
s := strings.Builder{}
s.WriteString(fmt.Sprintf("DROP INDEX %s", idx.IndexName))
if dname := dialect.Name(); dname == "MySQLDialect" {