update db code for release branch only (#8584)

Этот коммит содержится в:
Derrick Anderson
2018-04-05 11:27:19 -04:00
коммит произвёл GitHub
родитель 715a7f893d
Коммит f7dd715052
2 изменённых файлов: 11 добавлений и 11 удалений

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

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

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

@@ -396,8 +396,7 @@ func UpgradeDatabaseToVersion49(sqlStore SqlStore) {
// a number of parameters in `config.json` to a `Roles` table in the database. The migration code can be seen // 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()`. // in the file `app/app.go` in the function `DoAdvancedPermissionsMigration()`.
//TODO: Uncomment the following condition when version 4.9.0 is released if shouldPerformUpgrade(sqlStore, VERSION_4_8_1, VERSION_4_9_0) {
//if shouldPerformUpgrade(sqlStore, VERSION_4_8_1, VERSION_4_9_0) {
sqlStore.CreateColumnIfNotExists("Teams", "LastTeamIconUpdate", "bigint", "bigint", "0") sqlStore.CreateColumnIfNotExists("Teams", "LastTeamIconUpdate", "bigint", "bigint", "0")
defaultTimezone := model.DefaultUserTimezone() defaultTimezone := model.DefaultUserTimezone()
defaultTimezoneValue, err := json.Marshal(defaultTimezone) defaultTimezoneValue, err := json.Marshal(defaultTimezone)
@@ -406,6 +405,6 @@ func UpgradeDatabaseToVersion49(sqlStore SqlStore) {
} }
sqlStore.CreateColumnIfNotExists("Users", "Timezone", "varchar(256)", "varchar(256)", string(defaultTimezoneValue)) sqlStore.CreateColumnIfNotExists("Users", "Timezone", "varchar(256)", "varchar(256)", string(defaultTimezoneValue))
sqlStore.RemoveIndexIfExists("idx_channels_displayname", "Channels") sqlStore.RemoveIndexIfExists("idx_channels_displayname", "Channels")
// saveSchemaVersion(sqlStore, VERSION_4_9_0) saveSchemaVersion(sqlStore, VERSION_4_9_0)
//} }
} }