summaryrefslogtreecommitdiffstats
path: root/store/sqlstore/upgrade.go
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2018-03-13 13:36:23 +0000
committerGeorge Goldberg <george@gberg.me>2018-03-13 13:36:23 +0000
commitfadcdd271a68b38571b75d1d38ab023f940ac83a (patch)
tree7f413edd35401b54b2f4eb4a687da1ac273bcd4b /store/sqlstore/upgrade.go
parentb66e4bc932ed76c1cfd2b5f4ec0cfce70cd9fbb4 (diff)
parentf2d26801b9647715fb43af873354d8def753868b (diff)
downloadchat-fadcdd271a68b38571b75d1d38ab023f940ac83a.tar.gz
chat-fadcdd271a68b38571b75d1d38ab023f940ac83a.tar.bz2
chat-fadcdd271a68b38571b75d1d38ab023f940ac83a.zip
Merge branch 'master' into advanced-permissions-phase-1
Diffstat (limited to 'store/sqlstore/upgrade.go')
-rw-r--r--store/sqlstore/upgrade.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/store/sqlstore/upgrade.go b/store/sqlstore/upgrade.go
index de4dbe095..2b4532817 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,13 +367,19 @@ func UpgradeDatabaseToVersion471(sqlStore SqlStore) {
}
func UpgradeDatabaseToVersion48(sqlStore SqlStore) {
+ if shouldPerformUpgrade(sqlStore, VERSION_4_7_1, VERSION_4_8_0) {
+ saveSchemaVersion(sqlStore, VERSION_4_8_0)
+ }
+}
+
+func UpgradeDatabaseToVersion49(sqlStore SqlStore) {
// This version of Mattermost includes an App-Layer migration which migrates from hard-coded roles configured by
// a number of parameters in `config.json` to a `Roles` table in the database. The migration code can be seen
// in the file `app/app.go` in the function `DoAdvancedPermissionsMigration()`.
- //TODO: Uncomment the following condition when version 4.8.0 is released
- //if shouldPerformUpgrade(sqlStore, VERSION_4_7_0, VERSION_4_8_0) {
+ //TODO: Uncomment the following condition when version 4.9.0 is released
+ //if shouldPerformUpgrade(sqlStore, VERSION_4_8_0, VERSION_4_9_0) {
sqlStore.CreateColumnIfNotExists("Teams", "LastTeamIconUpdate", "bigint", "bigint", "0")
- // saveSchemaVersion(sqlStore, VERSION_4_8_0)
+ // saveSchemaVersion(sqlStore, VERSION_4_9_0)
//}
}