summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2018-03-05 14:39:49 -0500
committerGitHub <noreply@github.com>2018-03-05 14:39:49 -0500
commit6b3c9a480a0174cc7d1b17d0a0d874eedecc2dd3 (patch)
treedecb69fc9b306f1a4d8d40e3c04ba65cde8feeb5 /store
parent4a1802c039a0db2d97e8351c462963a99da857bf (diff)
downloadchat-6b3c9a480a0174cc7d1b17d0a0d874eedecc2dd3.tar.gz
chat-6b3c9a480a0174cc7d1b17d0a0d874eedecc2dd3.tar.bz2
chat-6b3c9a480a0174cc7d1b17d0a0d874eedecc2dd3.zip
Add preparatory upgrade code for 4.9 (#8408)
Diffstat (limited to 'store')
-rw-r--r--store/sqlstore/upgrade.go15
1 files changed, 11 insertions, 4 deletions
diff --git a/store/sqlstore/upgrade.go b/store/sqlstore/upgrade.go
index 9cbef233e..388323944 100644
--- a/store/sqlstore/upgrade.go
+++ b/store/sqlstore/upgrade.go
@@ -15,6 +15,7 @@ import (
)
const (
+ VERSION_4_9_0 = "4.9.0"
VERSION_4_8_0 = "4.8.0"
VERSION_4_7_1 = "4.7.1"
VERSION_4_7_0 = "4.7.0"
@@ -68,6 +69,7 @@ func UpgradeDatabase(sqlStore SqlStore) {
UpgradeDatabaseToVersion47(sqlStore)
UpgradeDatabaseToVersion471(sqlStore)
UpgradeDatabaseToVersion48(sqlStore)
+ UpgradeDatabaseToVersion49(sqlStore)
// If the SchemaVersion is empty this this is the first time it has ran
// so lets set it to the current version.
@@ -365,10 +367,15 @@ func UpgradeDatabaseToVersion471(sqlStore SqlStore) {
}
func UpgradeDatabaseToVersion48(sqlStore SqlStore) {
+ if shouldPerformUpgrade(sqlStore, VERSION_4_7_1, VERSION_4_8_0) {
+ sqlStore.CreateColumnIfNotExists("Teams", "LastTeamIconUpdate", "bigint", "bigint", "0")
+ saveSchemaVersion(sqlStore, VERSION_4_8_0)
+ }
+}
- //TODO: Uncomment the following condition when version 4.8.0 is released
- //if shouldPerformUpgrade(sqlStore, VERSION_4_7_0, VERSION_4_8_0) {
- sqlStore.CreateColumnIfNotExists("Teams", "LastTeamIconUpdate", "bigint", "bigint", "0")
- // saveSchemaVersion(sqlStore, VERSION_4_8_0)
+func UpgradeDatabaseToVersion49(sqlStore SqlStore) {
+ //TODO: Uncomment the following condition when version 4.9.0 is released
+ //if shouldPerformUpgrade(sqlStore, VERSION_4_8_0, VERSION_4_9_0) {
+ // saveSchemaVersion(sqlStore, VERSION_4_9_0)
//}
}