mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Upgrading schema version to 5.12.0 (#11043)
This commit is contained in:
committed by
GitHub
parent
1f397732dd
commit
f39dd28b72
@@ -13,6 +13,7 @@ import (
|
||||
// It should be maintained in chronological order with most current
|
||||
// release at the front of the list.
|
||||
var versions = []string{
|
||||
"5.12.0",
|
||||
"5.11.0",
|
||||
"5.10.0",
|
||||
"5.9.0",
|
||||
|
||||
@@ -20,6 +20,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
VERSION_5_12_0 = "5.12.0"
|
||||
VERSION_5_11_0 = "5.11.0"
|
||||
VERSION_5_10_0 = "5.10.0"
|
||||
VERSION_5_9_0 = "5.9.0"
|
||||
@@ -678,14 +679,13 @@ func UpgradeDatabaseToVersion511(sqlStore SqlStore) {
|
||||
}
|
||||
|
||||
func UpgradeDatabaseToVersion512(sqlStore SqlStore) {
|
||||
// TODO: Uncomment following condition when version 5.12.0 is released
|
||||
// if shouldPerformUpgrade(sqlStore, VERSION_5_11_0, VERSION_5_12_0) {
|
||||
sqlStore.CreateColumnIfNotExistsNoDefault("TeamMembers", "SchemeGuest", "boolean", "boolean")
|
||||
sqlStore.CreateColumnIfNotExistsNoDefault("ChannelMembers", "SchemeGuest", "boolean", "boolean")
|
||||
sqlStore.CreateColumnIfNotExistsNoDefault("Schemes", "DefaultTeamGuestRole", "text", "VARCHAR(64)")
|
||||
sqlStore.CreateColumnIfNotExistsNoDefault("Schemes", "DefaultChannelGuestRole", "text", "VARCHAR(64)")
|
||||
sqlStore.GetMaster().Exec("UPDATE Schemes SET DefaultTeamGuestRole = '', DefaultChannelGuestRole = ''")
|
||||
if shouldPerformUpgrade(sqlStore, VERSION_5_11_0, VERSION_5_12_0) {
|
||||
sqlStore.CreateColumnIfNotExistsNoDefault("TeamMembers", "SchemeGuest", "boolean", "boolean")
|
||||
sqlStore.CreateColumnIfNotExistsNoDefault("ChannelMembers", "SchemeGuest", "boolean", "boolean")
|
||||
sqlStore.CreateColumnIfNotExistsNoDefault("Schemes", "DefaultTeamGuestRole", "text", "VARCHAR(64)")
|
||||
sqlStore.CreateColumnIfNotExistsNoDefault("Schemes", "DefaultChannelGuestRole", "text", "VARCHAR(64)")
|
||||
sqlStore.GetMaster().Exec("UPDATE Schemes SET DefaultTeamGuestRole = '', DefaultChannelGuestRole = ''")
|
||||
|
||||
// saveSchemaVersion(sqlStore, VERSION_5_12_0)
|
||||
// }
|
||||
saveSchemaVersion(sqlStore, VERSION_5_12_0)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user