From c09f1b9e4e5638080622ff9aa70735db382a16df Mon Sep 17 00:00:00 2001 From: hmhealey Date: Thu, 9 Jul 2015 13:59:19 -0400 Subject: Renamed FullName column in database to Nickname. Renamed all serverside references from FullName to Nickname. --- store/sql_user_store.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'store/sql_user_store.go') 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") } -- cgit v1.2.3-1-g7c22