Unverified Commit e77f9d06 authored by Carlos Tadeu Panato Junior's avatar Carlos Tadeu Panato Junior Committed by GitHub

Uncomment upgrade for 5.4.0 (#9477)

parent 34a1da97
......@@ -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.4.0",
"5.3.0",
"5.2.0",
"5.1.0",
......
......@@ -492,15 +492,15 @@ func UpgradeDatabaseToVersion53(sqlStore SqlStore) {
}
func UpgradeDatabaseToVersion54(sqlStore SqlStore) {
// TODO: Uncomment following condition when version 5.4.0 is released
// if shouldPerformUpgrade(sqlStore, VERSION_5_3_0, VERSION_5_4_0) {
sqlStore.AlterColumnTypeIfExists("OutgoingWebhooks", "Description", "varchar(500)", "varchar(500)")
sqlStore.AlterColumnTypeIfExists("IncomingWebhooks", "Description", "varchar(500)", "varchar(500)")
if err := sqlStore.Channel().MigratePublicChannels(); err != nil {
mlog.Critical("Failed to migrate PublicChannels table", mlog.Err(err))
time.Sleep(time.Second)
os.Exit(EXIT_GENERIC_FAILURE)
if shouldPerformUpgrade(sqlStore, VERSION_5_3_0, VERSION_5_4_0) {
sqlStore.AlterColumnTypeIfExists("OutgoingWebhooks", "Description", "varchar(500)", "varchar(500)")
sqlStore.AlterColumnTypeIfExists("IncomingWebhooks", "Description", "varchar(500)", "varchar(500)")
if err := sqlStore.Channel().MigratePublicChannels(); err != nil {
mlog.Critical("Failed to migrate PublicChannels table", mlog.Err(err))
time.Sleep(time.Second)
os.Exit(EXIT_GENERIC_FAILURE)
}
sqlStore.CreateColumnIfNotExists("Users", "AcceptedServiceTermsId", "varchar(64)", "varchar(64)", "")
saveSchemaVersion(sqlStore, VERSION_5_4_0)
}
sqlStore.CreateColumnIfNotExists("Users", "AcceptedServiceTermsId", "varchar(64)", "varchar(64)", "")
// saveSchemaVersion(sqlStore, VERSION_5_4_0)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment