diff options
author | Saturnino Abril <saturnino.abril@gmail.com> | 2017-08-08 20:48:01 +0800 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-08-08 08:48:01 -0400 |
commit | dcaed2c8e3380a433e5b3b1a9a91edbd1de4be2f (patch) | |
tree | 36f594819c5fa6427a9e6a590a8a84028a26605d /store | |
parent | 5132c62d15d6a590ba44085c8c93d5dbe9200dc6 (diff) | |
download | chat-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.go | 17 |
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) + } } |