Summary
Adds the ability to configure custom (granular) deletion policies for posts for specific teams and/or channels. When the daily retention job runs it selectively deletes posts by age based on the configuration.
...
Column name | Description |
---|---|
| varchar, the RetentionPolicies.Id foreign key |
| varchar, the Channels.Id foreign key |
TBD: Does ChannelId
need to be indexed?
RetentionPoliciesTeams
table
Column name | Description |
---|---|
| varchar, the RetentionPolicies.Id foreign key |
| varchar, the Teams.Id foreign key |
TBD: Does TeamId
need to be indexed?
Model
Rename
DataRetentionPolicy
toGlobalDataRetentionPolicy
Add
RetentionPolicy
representing a record in theRetentionPolicies
table.Add
RetentionPolicyChannel
representing a record in theRetentionPoliciesChannels
table.Add
RetentionPolicyTeam
representing a record in theRetentionPoliciesTeams
table.
...
We need a query to determine the Posts
records to be deleted. The post id ids returned from that query from that query can be used to delete:
Reactions
Preferences
(ofCategory
‘flagged_post’)Threads
ThreadMemberships
LinkMetadata
TBD: these aren’t currently purged via data retention, but they probably should be.
FileInfo
(and their associated files on disk) and ChannelMemberHistory
continue to be deleted system-wide with no new granularity.
...