diff options
author | George Goldberg <george@gberg.me> | 2016-12-14 11:11:51 +0000 |
---|---|---|
committer | enahum <nahumhbl@gmail.com> | 2016-12-14 08:11:51 -0300 |
commit | 8406e854aa912f3d7f9179b10356444f07e25223 (patch) | |
tree | 353294a5ae87cf0c0cf3e675f32073fff1988d16 /store | |
parent | 973585450378a457a94824b7852c7ab7194e2b3e (diff) | |
download | chat-8406e854aa912f3d7f9179b10356444f07e25223.tar.gz chat-8406e854aa912f3d7f9179b10356444f07e25223.tar.bz2 chat-8406e854aa912f3d7f9179b10356444f07e25223.zip |
PLT-4332 Position field for Users (#4632)
* Add User.Position field to store & model.
* GOFMT
* Add Position to user settings.
* Unit tests.
* Add position to profile popup.
* i18n
* Fix log message for invalid position.
* Add Position field attribute to LDAP config.
* Add Position field attribute to SAML config.
* Reword empty position message.
* Change Position Max Length to 35.
* Better invalid position error message.
* Add new fields to config.json.
* Ensure position is never longer than max when displayed.
* Hard limit of 64 chars with soft limit still 35
* Put field with other attributes.
Diffstat (limited to 'store')
-rw-r--r-- | store/sql_upgrade.go | 3 | ||||
-rw-r--r-- | store/sql_user_store.go | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/store/sql_upgrade.go b/store/sql_upgrade.go index e4b1906e0..a275f664c 100644 --- a/store/sql_upgrade.go +++ b/store/sql_upgrade.go @@ -222,6 +222,9 @@ func UpgradeDatabaseToVersion36(sqlStore *SqlStore) { // Create Team Description column sqlStore.CreateColumnIfNotExists("Teams", "Description", "varchar(255)", "varchar(255)", "") + // Add a Position column to users. + sqlStore.CreateColumnIfNotExists("Users", "Position", "varchar(64)", "varchar(64)", "") + //saveSchemaVersion(sqlStore, VERSION_3_6_0) //} } diff --git a/store/sql_user_store.go b/store/sql_user_store.go index 5882ed454..b71d8214c 100644 --- a/store/sql_user_store.go +++ b/store/sql_user_store.go @@ -66,6 +66,7 @@ func NewSqlUserStore(sqlStore *SqlStore) UserStore { table.ColMap("NotifyProps").SetMaxSize(2000) table.ColMap("Locale").SetMaxSize(5) table.ColMap("MfaSecret").SetMaxSize(128) + table.ColMap("Position").SetMaxSize(64) } return us |