FIX: Update 'Largest Uploads' queries to use the upload_references table (#261)

The post_uploads table has been deprecated. This commit updates the 'Top 50 Largest Uploads' query to use the new upload_references table instead.
This commit is contained in:
TheJammiestDodger 2023-11-13 09:53:33 +00:00 committed by GitHub
parent fbe2a37e0c
commit 9f841a4c6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -357,9 +357,9 @@ module ::DiscourseDataExplorer
uploads.extension,
uploads.created_at,
uploads.url
FROM post_uploads
JOIN uploads ON uploads.id = post_uploads.upload_id
JOIN posts ON posts.id = post_uploads.post_id
FROM upload_references
JOIN uploads ON uploads.id = upload_references.upload_id
JOIN posts ON posts.id = upload_references.target_id AND upload_references.target_type = 'Post'
ORDER BY uploads.filesize DESC
LIMIT 50
SQL