Skip to content

Commit

Permalink
Prepare database upgrade function for v3.9 (mattermost#6004)
Browse files Browse the repository at this point in the history
  • Loading branch information
grundleborg authored and jwilander committed Apr 7, 2017
1 parent 56f25bb commit 08a469a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions store/sql_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ 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"
Expand Down Expand Up @@ -43,6 +44,7 @@ func UpgradeDatabase(sqlStore *SqlStore) {
UpgradeDatabaseToVersion36(sqlStore)
UpgradeDatabaseToVersion37(sqlStore)
UpgradeDatabaseToVersion38(sqlStore)
UpgradeDatabaseToVersion39(sqlStore)

// If the SchemaVersion is empty this this is the first time it has ran
// so lets set it to the current version.
Expand Down Expand Up @@ -251,3 +253,11 @@ func UpgradeDatabaseToVersion38(sqlStore *SqlStore) {
saveSchemaVersion(sqlStore, VERSION_3_8_0)
}
}

func UpgradeDatabaseToVersion39(sqlStore *SqlStore) {
// TODO: Uncomment following condition when version 3.9.0 is released
//if shouldPerformUpgrade(sqlStore, VERSION_3_8_0, VERSION_3_9_0) {

// saveSchemaVersion(sqlStore, VERSION_3_9_0)
//}
}

0 comments on commit 08a469a

Please sign in to comment.