[GH-25484] Fix draft removal on post deletion (#25715)

* [GH-25484] Fix draft removal on post deletion

* [GH-25484] Add batch migration to remove orphan drafts

* [GH-25484] Fix tests of migration and draft store

* [GH-25484] Remove translation file changes.

* [GH-25484] Remove translation file changes.

---------

Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Этот коммит содержится в:
Utsav Ladani
2024-01-29 20:25:34 +05:30
коммит произвёл GitHub
родитель 435da9bea7
Коммит 3ac6edb406
19 изменённых файлов: 1046 добавлений и 15 удалений

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

@@ -1005,9 +1005,11 @@ type DraftStore interface {
Upsert(d *model.Draft) (*model.Draft, error)
Get(userID, channelID, rootID string, includeDeleted bool) (*model.Draft, error)
Delete(userID, channelID, rootID string) error
DeleteDraftsAssociatedWithPost(channelID, rootID string) error
GetDraftsForUser(userID, teamID string) ([]*model.Draft, error)
GetLastCreateAtAndUserIdValuesForEmptyDraftsMigration(createAt int64, userId string) (int64, string, error)
DeleteEmptyDraftsByCreateAtAndUserId(createAt int64, userId string) error
DeleteOrphanDraftsByCreateAtAndUserId(createAt int64, userId string) error
}
type PostAcknowledgementStore interface {