Migrate Channel.MigrateChannelMembers to Sync by default (#11277)

Этот коммит содержится в:
Shobhit Gupta
2019-06-20 05:37:06 -07:00
коммит произвёл Jesús Espino
родитель de8a60225b
Коммит bd3f72254d
5 изменённых файлов: 72 добавлений и 71 удалений

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

@@ -87,16 +87,15 @@ func (worker *Worker) runAdvancedPermissionsPhase2Migration(lastDone string) (bo
}
} else if progress.CurrentTable == "ChannelMembers" {
// Run a ChannelMembers migration batch.
if result := <-worker.app.Srv.Store.Channel().MigrateChannelMembers(progress.LastChannelId, progress.LastUserId); result.Err != nil {
return false, progress.ToJson(), result.Err
if data, err := worker.app.Srv.Store.Channel().MigrateChannelMembers(progress.LastChannelId, progress.LastUserId); err != nil {
return false, progress.ToJson(), err
} else {
if result.Data == nil {
if data == nil {
// We haven't progressed. That means we've reached the end of this final stage of the migration.
return true, progress.ToJson(), nil
}
data := result.Data.(map[string]string)
progress.LastChannelId = data["ChannelId"]
progress.LastUserId = data["UserId"]
}