MM-25394 session expired push notifications (#14732)

* new job type created that checks for expired mobile sessions and pushes notifications.

* only send session expired notifications if ExtendSessionLengthWithActivity is enabled.

* includes schema change:  field added to Sessions table
Этот коммит содержится в:
Doug Lauder
2020-06-17 14:47:54 -04:00
коммит произвёл GitHub
родитель 2bb6071f73
Коммит b317ee5cf2
29 изменённых файлов: 694 добавлений и 4 удалений

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

@@ -19,6 +19,8 @@ import (
const (
CURRENT_SCHEMA_VERSION = VERSION_5_24_0
VERSION_5_26_0 = "5.26.0"
VERSION_5_25_0 = "5.25.0"
VERSION_5_24_0 = "5.24.0"
VERSION_5_23_0 = "5.23.0"
VERSION_5_22_0 = "5.22.0"
@@ -179,6 +181,8 @@ func upgradeDatabase(sqlStore SqlStore, currentModelVersionString string) error
upgradeDatabaseToVersion522(sqlStore)
upgradeDatabaseToVersion523(sqlStore)
upgradeDatabaseToVersion524(sqlStore)
upgradeDatabaseToVersion525(sqlStore)
upgradeDatabaseToVersion526(sqlStore)
return nil
}
@@ -803,3 +807,19 @@ func upgradeDatabaseToVersion524(sqlStore SqlStore) {
saveSchemaVersion(sqlStore, VERSION_5_24_0)
}
}
func upgradeDatabaseToVersion525(sqlStore SqlStore) {
// TODO: uncomment when the time arrive to upgrade the DB for 5.25
//if shouldPerformUpgrade(sqlStore, VERSION_5_24_0, VERSION_5_25_0) {
//saveSchemaVersion(sqlStore, VERSION_5_25_0)
//}
}
func upgradeDatabaseToVersion526(sqlStore SqlStore) {
// TODO: uncomment when the time arrive to upgrade the DB for 5.26
//if shouldPerformUpgrade(sqlStore, VERSION_5_25_0, VERSION_5_26_0) {
sqlStore.CreateColumnIfNotExists("Sessions", "ExpiredNotify", "boolean", "boolean", "0")
//saveSchemaVersion(sqlStore, VERSION_5_26_0)
//}
}