Этот коммит содержится в:
Carlos Tadeu Panato Junior
2020-06-04 16:14:22 +02:00
коммит произвёл GitHub
родитель 4df8927c60
Коммит ca8a67c7cb

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

@@ -18,7 +18,8 @@ import (
)
const (
CURRENT_SCHEMA_VERSION = VERSION_5_23_0
CURRENT_SCHEMA_VERSION = VERSION_5_24_0
VERSION_5_24_0 = "5.24.0"
VERSION_5_23_0 = "5.23.0"
VERSION_5_22_0 = "5.22.0"
VERSION_5_21_0 = "5.21.0"
@@ -794,13 +795,11 @@ func upgradeDatabaseToVersion523(sqlStore SqlStore) {
}
func upgradeDatabaseToVersion524(sqlStore SqlStore) {
// TODO: uncomment when the time arrive to upgrade the DB for 5.24
// if shouldPerformUpgrade(sqlStore, VERSION_5_23_0, VERSION_5_24_0) {
if shouldPerformUpgrade(sqlStore, VERSION_5_23_0, VERSION_5_24_0) {
sqlStore.CreateColumnIfNotExists("UserGroups", "AllowReference", "boolean", "boolean", "0")
sqlStore.GetMaster().Exec("UPDATE UserGroups SET Name = null, AllowReference = false")
sqlStore.AlterPrimaryKey("Reactions", []string{"PostId", "UserId", "EmojiName"})
sqlStore.CreateColumnIfNotExists("UserGroups", "AllowReference", "boolean", "boolean", "0")
sqlStore.GetMaster().Exec("UPDATE UserGroups SET Name = null, AllowReference = false")
sqlStore.AlterPrimaryKey("Reactions", []string{"PostId", "UserId", "EmojiName"})
// saveSchemaVersion(sqlStore, VERSION_5_24_0)
// }
saveSchemaVersion(sqlStore, VERSION_5_24_0)
}
}