mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
XYZ-32: Increases size of position to 128 characters. (#8148)
* XYZ-32: Changes type of 'position' column on 'users' table. * XYZ-32: Uncomment to run on CI and pre-release. * XYZ-32: Reverts translation changes. * XYZ-32: Fix for gofmt.
This commit is contained in:
committed by
Joram Wilander
parent
3da2dad989
commit
540dd9ae94
@@ -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)
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user