Renamed FullName column in database to Nickname. Renamed all serverside references from FullName to Nickname.

Этот коммит содержится в:
hmhealey
2015-07-09 13:59:19 -04:00
родитель 1d7509493e
Коммит c09f1b9e4e
22 изменённых файлов: 168 добавлений и 158 удалений

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

@@ -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")
}