summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
Diffstat (limited to 'store')
-rw-r--r--store/sql_upgrade.go6
-rw-r--r--store/sql_user_store.go2
2 files changed, 7 insertions, 1 deletions
diff --git a/store/sql_upgrade.go b/store/sql_upgrade.go
index a7b72124e..157a85507 100644
--- a/store/sql_upgrade.go
+++ b/store/sql_upgrade.go
@@ -282,6 +282,12 @@ func UpgradeDatabaseToVersion40(sqlStore SqlStore) {
func UpgradeDatabaseToVersion41(sqlStore SqlStore) {
// TODO: Uncomment following condition when version 4.1.0 is released
// if shouldPerformUpgrade(sqlStore, VERSION_4_0_0, VERSION_4_1_0) {
+
+ // Increase maximum length of the Users table Roles column.
+ if sqlStore.GetMaxLengthOfColumnIfExists("Users", "Roles") != "256" {
+ sqlStore.AlterColumnTypeIfExists("Users", "Roles", "varchar(256)", "varchar(256)")
+ }
+
sqlStore.RemoveTableIfExists("JobStatuses")
// saveSchemaVersion(sqlStore, VERSION_4_1_0)
// }
diff --git a/store/sql_user_store.go b/store/sql_user_store.go
index ab031ea19..64079c8d3 100644
--- a/store/sql_user_store.go
+++ b/store/sql_user_store.go
@@ -62,7 +62,7 @@ func NewSqlUserStore(sqlStore SqlStore) UserStore {
table.ColMap("Nickname").SetMaxSize(64)
table.ColMap("FirstName").SetMaxSize(64)
table.ColMap("LastName").SetMaxSize(64)
- table.ColMap("Roles").SetMaxSize(64)
+ table.ColMap("Roles").SetMaxSize(256)
table.ColMap("Props").SetMaxSize(4000)
table.ColMap("NotifyProps").SetMaxSize(2000)
table.ColMap("Locale").SetMaxSize(5)