diff options
Diffstat (limited to 'store/sql_user_store.go')
-rw-r--r-- | store/sql_user_store.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/store/sql_user_store.go b/store/sql_user_store.go index 665e4d697..9e1cc9331 100644 --- a/store/sql_user_store.go +++ b/store/sql_user_store.go @@ -25,7 +25,7 @@ func NewSqlUserStore(sqlStore *SqlStore) UserStore { table.ColMap("Password").SetMaxSize(128) table.ColMap("AuthData").SetMaxSize(128) table.ColMap("Email").SetMaxSize(128) - table.ColMap("FullName").SetMaxSize(64) + table.ColMap("Nickname").SetMaxSize(64) table.ColMap("Roles").SetMaxSize(64) table.ColMap("Props").SetMaxSize(4000) table.ColMap("NotifyProps").SetMaxSize(2000) @@ -36,10 +36,15 @@ func NewSqlUserStore(sqlStore *SqlStore) UserStore { return us } -func (s SqlUserStore) UpgradeSchemaIfNeeded() { - s.CreateColumnIfNotExists("Users","LastPictureUpdate", "LastPasswordUpdate", "bigint(20)", "0") +func (us SqlUserStore) UpgradeSchemaIfNeeded() { + us.CreateColumnIfNotExists("Users", "LastPictureUpdate", "LastPasswordUpdate", "bigint(20)", "0") + + // migrating the FullName column to Nickname for MM-825 + us.RenameColumnIfExists("Users", "FullName", "Nickname", "varchar(64)") } +//func (ss SqlStore) CreateColumnIfNotExists(tableName string, columnName string, afterName string, colType string, defaultValue string) bool { + func (us SqlUserStore) CreateIndexesIfNotExists() { us.CreateIndexIfNotExists("idx_team_id", "Users", "TeamId") } |