[MM-12667] Allow including deactivated users in bulk import and export (#10353)

* [MM-12667] Allow including deactivated users in bulk import and export

1. Added `deleteAt` for user type import line
2. Adding deactivated users data in bulk export
3. Importing deactivated users data in bulk import

Added/Updated relevant test cases

* Fixed export of replies to posts by deleted users.
Updated tests for same
Этот коммит содержится в:
Sandeep Sukhani
2019-03-01 21:20:24 +05:30
коммит произвёл George Goldberg
родитель 7ac5715a02
Коммит 7f9e1273d7
9 изменённых файлов: 96 добавлений и 11 удалений

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

@@ -1327,7 +1327,6 @@ func (s *SqlPostStore) GetParentsForExportAfter(limit int, afterId string) store
AND p1.DeleteAt = 0
AND Channels.DeleteAt = 0
AND Teams.DeleteAt = 0
AND Users.DeleteAt = 0
ORDER BY
p1.Id
LIMIT
@@ -1356,7 +1355,6 @@ func (s *SqlPostStore) GetRepliesForExport(parentId string) store.StoreChannel {
WHERE
Posts.ParentId = :ParentId
AND Posts.DeleteAt = 0
AND Users.DeleteAt = 0
ORDER BY
Posts.Id`,
map[string]interface{}{"ParentId": parentId})