Merge branch 'master' into advanced-permissions-phase-1

Этот коммит содержится в:
Martin Kraft
2018-03-23 09:08:49 -04:00
родитель 37f0e5e0eb 87762ae62e
Коммит 5fa1b35819
53 изменённых файлов: 2849 добавлений и 164 удалений

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

@@ -4,6 +4,7 @@
package sqlstore
import (
"encoding/json"
"os"
"strings"
"time"
@@ -380,6 +381,12 @@ func UpgradeDatabaseToVersion49(sqlStore SqlStore) {
//TODO: Uncomment the following condition when version 4.9.0 is released
//if shouldPerformUpgrade(sqlStore, VERSION_4_8_0, VERSION_4_9_0) {
sqlStore.CreateColumnIfNotExists("Teams", "LastTeamIconUpdate", "bigint", "bigint", "0")
defaultTimezone := model.DefaultUserTimezone()
defaultTimezoneValue, err := json.Marshal(defaultTimezone)
if err != nil {
l4g.Critical(err)
}
sqlStore.CreateColumnIfNotExists("Users", "Timezone", "varchar(256)", "varchar(256)", string(defaultTimezoneValue))
// saveSchemaVersion(sqlStore, VERSION_4_9_0)
//}
}

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

@@ -79,6 +79,7 @@ func NewSqlUserStore(sqlStore SqlStore, metrics einterfaces.MetricsInterface) st
table.ColMap("Locale").SetMaxSize(5)
table.ColMap("MfaSecret").SetMaxSize(128)
table.ColMap("Position").SetMaxSize(128)
table.ColMap("Timezone").SetMaxSize(256)
}
return us