db: upgrade db to 5.36 (#17687)

This commit is contained in:
Carlos Tadeu Panato Junior
2021-06-02 23:12:02 +02:00
committed by GitHub
parent 02d60a9b93
commit fff09bf210
2 changed files with 8 additions and 8 deletions

View File

@@ -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.36.0",
"5.35.0",
"5.34.0",
"5.33.0",

View File

@@ -19,7 +19,7 @@ import (
)
const (
CurrentSchemaVersion = Version5350
CurrentSchemaVersion = Version5360
Version5360 = "5.36.0"
Version5350 = "5.35.0"
Version5340 = "5.34.0"
@@ -1077,14 +1077,13 @@ func upgradeDatabaseToVersion535(sqlStore *SqlStore) {
}
func upgradeDatabaseToVersion536(sqlStore *SqlStore) {
//if shouldPerformUpgrade(sqlStore, Version5350, Version5360) {
if shouldPerformUpgrade(sqlStore, Version5350, Version5360) {
sqlStore.CreateColumnIfNotExists("SharedChannelUsers", "ChannelId", "VARCHAR(26)", "VARCHAR(26)", "")
sqlStore.CreateColumnIfNotExists("SharedChannelRemotes", "LastPostUpdateAt", "bigint", "bigint", "0")
sqlStore.CreateColumnIfNotExists("SharedChannelRemotes", "LastPostId", "VARCHAR(26)", "VARCHAR(26)", "")
sqlStore.CreateColumnIfNotExists("SharedChannelUsers", "ChannelId", "VARCHAR(26)", "VARCHAR(26)", "")
sqlStore.CreateColumnIfNotExists("SharedChannelRemotes", "LastPostUpdateAt", "bigint", "bigint", "0")
sqlStore.CreateColumnIfNotExists("SharedChannelRemotes", "LastPostId", "VARCHAR(26)", "VARCHAR(26)", "")
//saveSchemaVersion(sqlStore, Version5360)
//}
saveSchemaVersion(sqlStore, Version5360)
}
}
func rootCountMigration(sqlStore *SqlStore) {