summaryrefslogtreecommitdiffstats
path: root/store/sql_upgrade.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-05-06 08:48:56 -0400
committerGitHub <noreply@github.com>2017-05-06 08:48:56 -0400
commitdc852a71c02a3a3757f60f61edae07bdb24eaa3b (patch)
tree42b817ea2ac35cd4bacdfc8c6caab7199350ccd3 /store/sql_upgrade.go
parent52b5c74a0f0a5cee8577976b46928c7fe3a45979 (diff)
downloadchat-dc852a71c02a3a3757f60f61edae07bdb24eaa3b.tar.gz
chat-dc852a71c02a3a3757f60f61edae07bdb24eaa3b.tar.bz2
chat-dc852a71c02a3a3757f60f61edae07bdb24eaa3b.zip
Add preparatory upgrade code for 3.10 (#6337)
Diffstat (limited to 'store/sql_upgrade.go')
-rw-r--r--store/sql_upgrade.go30
1 files changed, 20 insertions, 10 deletions
diff --git a/store/sql_upgrade.go b/store/sql_upgrade.go
index bf291c345..b5f78a671 100644
--- a/store/sql_upgrade.go
+++ b/store/sql_upgrade.go
@@ -15,16 +15,17 @@ import (
)
const (
- VERSION_3_9_0 = "3.9.0"
- VERSION_3_8_0 = "3.8.0"
- VERSION_3_7_0 = "3.7.0"
- VERSION_3_6_0 = "3.6.0"
- VERSION_3_5_0 = "3.5.0"
- VERSION_3_4_0 = "3.4.0"
- VERSION_3_3_0 = "3.3.0"
- VERSION_3_2_0 = "3.2.0"
- VERSION_3_1_0 = "3.1.0"
- VERSION_3_0_0 = "3.0.0"
+ VERSION_3_10_0 = "3.10.0"
+ VERSION_3_9_0 = "3.9.0"
+ VERSION_3_8_0 = "3.8.0"
+ VERSION_3_7_0 = "3.7.0"
+ VERSION_3_6_0 = "3.6.0"
+ VERSION_3_5_0 = "3.5.0"
+ VERSION_3_4_0 = "3.4.0"
+ VERSION_3_3_0 = "3.3.0"
+ VERSION_3_2_0 = "3.2.0"
+ VERSION_3_1_0 = "3.1.0"
+ VERSION_3_0_0 = "3.0.0"
)
const (
@@ -45,6 +46,7 @@ func UpgradeDatabase(sqlStore *SqlStore) {
UpgradeDatabaseToVersion37(sqlStore)
UpgradeDatabaseToVersion38(sqlStore)
UpgradeDatabaseToVersion39(sqlStore)
+ UpgradeDatabaseToVersion310(sqlStore)
// If the SchemaVersion is empty this this is the first time it has ran
// so lets set it to the current version.
@@ -262,3 +264,11 @@ func UpgradeDatabaseToVersion39(sqlStore *SqlStore) {
saveSchemaVersion(sqlStore, VERSION_3_9_0)
}
}
+
+func UpgradeDatabaseToVersion310(sqlStore *SqlStore) {
+ // TODO: Uncomment following condition when version 3.10.0 is released
+ //if shouldPerformUpgrade(sqlStore, VERSION_3_9_0, VERSION_3_10_0) {
+
+ // saveSchemaVersion(sqlStore, VERSION_3_10_0)
+ //}
+}