summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
authorSaturnino Abril <saturnino.abril@gmail.com>2017-08-08 20:48:01 +0800
committerJoram Wilander <jwawilander@gmail.com>2017-08-08 08:48:01 -0400
commitdcaed2c8e3380a433e5b3b1a9a91edbd1de4be2f (patch)
tree36f594819c5fa6427a9e6a590a8a84028a26605d /store
parent5132c62d15d6a590ba44085c8c93d5dbe9200dc6 (diff)
downloadchat-dcaed2c8e3380a433e5b3b1a9a91edbd1de4be2f.tar.gz
chat-dcaed2c8e3380a433e5b3b1a9a91edbd1de4be2f.tar.bz2
chat-dcaed2c8e3380a433e5b3b1a9a91edbd1de4be2f.zip
uncomment upgrade for 4.1 (#7128)
Diffstat (limited to 'store')
-rw-r--r--store/sql_upgrade.go17
1 files changed, 8 insertions, 9 deletions
diff --git a/store/sql_upgrade.go b/store/sql_upgrade.go
index 1ea9496f5..26ff9a164 100644
--- a/store/sql_upgrade.go
+++ b/store/sql_upgrade.go
@@ -281,15 +281,14 @@ 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) {
+ 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)")
+ }
- // 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")
- sqlStore.RemoveTableIfExists("JobStatuses")
- // saveSchemaVersion(sqlStore, VERSION_4_1_0)
- // }
+ saveSchemaVersion(sqlStore, VERSION_4_1_0)
+ }
}