Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Prevent breaking old sqlite's when media retention is enabled #12977

Merged
merged 2 commits into from
Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/12977.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add new `media_retention` options to the homeserver config for routinely cleaning up non-recently accessed media.
2 changes: 1 addition & 1 deletion synapse/storage/databases/main/media_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ async def get_local_media_ids(
if include_protected_media is False:
# Do not include media that has been protected from quarantine
sql += """
AND safe_from_quarantine = false
AND NOT safe_from_quarantine
"""

def _get_local_media_ids_txn(txn: LoggingTransaction) -> List[str]:
Expand Down