Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add preparatory upgrade code for 3.10 #6337

Merged
merged 1 commit into from
May 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions store/sql_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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.
Expand Down Expand Up @@ -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)
//}
}