Fix bots being unable to post when personal access tokens are disabled. (#11105)

Этот коммит содержится в:
Christopher Speller
2019-06-13 11:54:09 -07:00
коммит произвёл GitHub
родитель 729a7ac0ac
Коммит 1ca421472f
5 изменённых файлов: 40 добавлений и 5 удалений

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

@@ -688,6 +688,9 @@ func UpgradeDatabaseToVersion512(sqlStore SqlStore) {
sqlStore.CreateColumnIfNotExistsNoDefault("Schemes", "DefaultChannelGuestRole", "text", "VARCHAR(64)")
sqlStore.GetMaster().Exec("UPDATE Schemes SET DefaultTeamGuestRole = '', DefaultChannelGuestRole = ''")
// Saturday, January 24, 2065 5:20:00 AM GMT. To remove all personal access token sessions.
sqlStore.GetMaster().Exec("DELETE FROM Sessions WHERE ExpiresAt > 3000000000000")
saveSchemaVersion(sqlStore, VERSION_5_12_0)
}
}