* upgrade to 5.5

* add 5.6 upgrade db
Этот коммит содержится в:
Carlos Tadeu Panato Junior
2018-11-05 21:38:30 +01:00
коммит произвёл GitHub
родитель 1aa3ceccc2
Коммит 46dd243331
2 изменённых файлов: 14 добавлений и 5 удалений

Просмотреть файл

@@ -13,6 +13,7 @@ import (
// It should be maintained in chronological order with most current
// release at the front of the list.
var versions = []string{
"5.5.0",
"5.4.0",
"5.3.0",
"5.2.0",

Просмотреть файл

@@ -15,6 +15,7 @@ import (
)
const (
VERSION_5_6_0 = "5.6.0"
VERSION_5_5_0 = "5.5.0"
VERSION_5_4_0 = "5.4.0"
VERSION_5_3_0 = "5.3.0"
@@ -88,6 +89,7 @@ func UpgradeDatabase(sqlStore SqlStore) {
UpgradeDatabaseToVersion53(sqlStore)
UpgradeDatabaseToVersion54(sqlStore)
UpgradeDatabaseToVersion55(sqlStore)
UpgradeDatabaseToVersion56(sqlStore)
// If the SchemaVersion is empty this this is the first time it has ran
// so lets set it to the current version.
@@ -508,9 +510,15 @@ func UpgradeDatabaseToVersion54(sqlStore SqlStore) {
}
func UpgradeDatabaseToVersion55(sqlStore SqlStore) {
// TODO: Uncomment following condition when version 5.5.0 is released
// if shouldPerformUpgrade(sqlStore, VERSION_5_4_0, VERSION_5_5_0) {
sqlStore.CreateColumnIfNotExists("PluginKeyValueStore", "ExpireAt", "bigint(20)", "bigint", "0")
// saveSchemaVersion(sqlStore, VERSION_5_5_0)
// }
if shouldPerformUpgrade(sqlStore, VERSION_5_4_0, VERSION_5_5_0) {
saveSchemaVersion(sqlStore, VERSION_5_5_0)
}
}
func UpgradeDatabaseToVersion56(sqlStore SqlStore) {
// TODO: Uncomment following condition when version 5.5.0 is released
//if shouldPerformUpgrade(sqlStore, VERSION_5_5_0, VERSION_5_6_0) {
sqlStore.CreateColumnIfNotExists("PluginKeyValueStore", "ExpireAt", "bigint(20)", "bigint", "0")
// saveSchemaVersion(sqlStore, VERSION_5_5_0)
//}
}