summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
Diffstat (limited to 'store')
-rw-r--r--store/sqlstore/upgrade.go18
-rw-r--r--store/sqlstore/user_store.go2
2 files changed, 14 insertions, 6 deletions
diff --git a/store/sqlstore/upgrade.go b/store/sqlstore/upgrade.go
index 4095e4cac..7f38e3a73 100644
--- a/store/sqlstore/upgrade.go
+++ b/store/sqlstore/upgrade.go
@@ -15,6 +15,7 @@ import (
)
const (
+ VERSION_4_7_0 = "4.7.0"
VERSION_4_6_0 = "4.6.0"
VERSION_4_5_0 = "4.5.0"
VERSION_4_4_0 = "4.4.0"
@@ -62,6 +63,7 @@ func UpgradeDatabase(sqlStore SqlStore) {
UpgradeDatabaseToVersion44(sqlStore)
UpgradeDatabaseToVersion45(sqlStore)
UpgradeDatabaseToVersion46(sqlStore)
+ UpgradeDatabaseToVersion47(sqlStore)
// If the SchemaVersion is empty this this is the first time it has ran
// so lets set it to the current version.
@@ -324,8 +326,13 @@ func UpgradeDatabaseToVersion44(sqlStore SqlStore) {
}
}
-func UpgradeDatabaseToVersion46(sqlStore SqlStore) {
+func UpgradeDatabaseToVersion45(sqlStore SqlStore) {
+ if shouldPerformUpgrade(sqlStore, VERSION_4_4_0, VERSION_4_5_0) {
+ saveSchemaVersion(sqlStore, VERSION_4_5_0)
+ }
+}
+func UpgradeDatabaseToVersion46(sqlStore SqlStore) {
if shouldPerformUpgrade(sqlStore, VERSION_4_5_0, VERSION_4_6_0) {
sqlStore.CreateColumnIfNotExists("IncomingWebhooks", "Username", "varchar(64)", "varchar(64)", "")
sqlStore.CreateColumnIfNotExists("IncomingWebhooks", "IconURL", "varchar(1024)", "varchar(1024)", "")
@@ -333,8 +340,9 @@ func UpgradeDatabaseToVersion46(sqlStore SqlStore) {
}
}
-func UpgradeDatabaseToVersion45(sqlStore SqlStore) {
- if shouldPerformUpgrade(sqlStore, VERSION_4_4_0, VERSION_4_5_0) {
- saveSchemaVersion(sqlStore, VERSION_4_5_0)
- }
+func UpgradeDatabaseToVersion47(sqlStore SqlStore) {
+ // if shouldPerformUpgrade(sqlStore, VERSION_4_6_0, VERSION_4_7_0) {
+ sqlStore.AlterColumnTypeIfExists("Users", "Position", "varchar(128)", "varchar(128)")
+ // saveSchemaVersion(sqlStore, VERSION_4_7_0)
+ // }
}
diff --git a/store/sqlstore/user_store.go b/store/sqlstore/user_store.go
index 549377d61..d67a45704 100644
--- a/store/sqlstore/user_store.go
+++ b/store/sqlstore/user_store.go
@@ -69,7 +69,7 @@ func NewSqlUserStore(sqlStore SqlStore, metrics einterfaces.MetricsInterface) st
table.ColMap("NotifyProps").SetMaxSize(2000)
table.ColMap("Locale").SetMaxSize(5)
table.ColMap("MfaSecret").SetMaxSize(128)
- table.ColMap("Position").SetMaxSize(64)
+ table.ColMap("Position").SetMaxSize(128)
}
return us