summaryrefslogtreecommitdiffstats
path: root/store/sqlstore
diff options
context:
space:
mode:
Diffstat (limited to 'store/sqlstore')
-rw-r--r--store/sqlstore/upgrade.go7
-rw-r--r--store/sqlstore/user_store.go1
2 files changed, 8 insertions, 0 deletions
diff --git a/store/sqlstore/upgrade.go b/store/sqlstore/upgrade.go
index 2b4532817..174b434f8 100644
--- a/store/sqlstore/upgrade.go
+++ b/store/sqlstore/upgrade.go
@@ -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)
//}
}
diff --git a/store/sqlstore/user_store.go b/store/sqlstore/user_store.go
index 5e84af930..f4ed3e400 100644
--- a/store/sqlstore/user_store.go
+++ b/store/sqlstore/user_store.go
@@ -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