summaryrefslogtreecommitdiffstats
path: root/store/sqlstore/upgrade.go
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2018-02-13 13:35:52 +0000
committerGeorge Goldberg <george@gberg.me>2018-02-13 13:46:01 +0000
commit5c101253c5987743cf1b3a8fe68814d748070622 (patch)
treee2632505d051e7d15d6daf974ed8ac92095f82fe /store/sqlstore/upgrade.go
parentb7fc3d7d35ca4dd16097715a66463392a1dfaf0a (diff)
parentd88d2bc2ed3aefa68b5ed2942f493ae42bb40bfa (diff)
downloadchat-5c101253c5987743cf1b3a8fe68814d748070622.tar.gz
chat-5c101253c5987743cf1b3a8fe68814d748070622.tar.bz2
chat-5c101253c5987743cf1b3a8fe68814d748070622.zip
Merge branch 'master' into advanced-permissions-phase-1
Diffstat (limited to 'store/sqlstore/upgrade.go')
-rw-r--r--store/sqlstore/upgrade.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/store/sqlstore/upgrade.go b/store/sqlstore/upgrade.go
index 0de91f28b..56fdf9d6c 100644
--- a/store/sqlstore/upgrade.go
+++ b/store/sqlstore/upgrade.go
@@ -15,6 +15,7 @@ import (
)
const (
+ VERSION_4_8_0 = "4.8.0"
VERSION_4_7_0 = "4.7.0"
VERSION_4_6_0 = "4.6.0"
VERSION_4_5_0 = "4.5.0"
@@ -64,6 +65,7 @@ func UpgradeDatabase(sqlStore SqlStore) {
UpgradeDatabaseToVersion45(sqlStore)
UpgradeDatabaseToVersion46(sqlStore)
UpgradeDatabaseToVersion47(sqlStore)
+ UpgradeDatabaseToVersion48(sqlStore)
// If the SchemaVersion is empty this this is the first time it has ran
// so lets set it to the current version.
@@ -343,6 +345,14 @@ func UpgradeDatabaseToVersion46(sqlStore SqlStore) {
func UpgradeDatabaseToVersion47(sqlStore SqlStore) {
if shouldPerformUpgrade(sqlStore, VERSION_4_6_0, VERSION_4_7_0) {
sqlStore.AlterColumnTypeIfExists("Users", "Position", "varchar(128)", "varchar(128)")
+ sqlStore.AlterColumnTypeIfExists("OAuthAuthData", "State", "varchar(1024)", "varchar(1024)")
saveSchemaVersion(sqlStore, VERSION_4_7_0)
}
}
+
+func UpgradeDatabaseToVersion48(sqlStore SqlStore) {
+ //TODO: Uncomment the following condition when version 4.8.0 is released
+ //if shouldPerformUpgrade(sqlStore, VERSION_4_7_0, VERSION_4_8_0) {
+ // saveSchemaVersion(sqlStore, VERSION_4_8_0)
+ //}
+}