discourse/app
Ted Johansson 9655bf3e24
DEV: Delete upload references on draft cleanup (#26877)
In #22851 we added a dependent strategy for deleting upload references when a draft is destroyed. This, however, didn't catch all cases, because we still have some code that issues DELETE drafts queries directly to the database. Specifically in the weekly cleanup job handled by Draft#cleanup!.

This PR fixes that by turning the raw query into an ActiveRecord #destroy_all, which will invoke the dependent strategy that ultimately deletes the upload references. It also includes a post migration to clear orphaned upload references that are already in the database.
2024-05-06 14:08:10 +08:00
..
assets FEATURE: revert redirect from wizard to guide (#26873) 2024-05-06 14:56:35 +10:00
controllers DEV: Use safer SQL function for string queries when searching groups (#26851) 2024-05-02 13:41:49 -05:00
helpers FIX: Include HTML content for authenticated users with crawler UA (#26757) 2024-04-25 22:41:57 +01:00
jobs FIX: Better tracking of topic visibility changes (#26709) 2024-04-29 10:34:46 +10:00
mailers FIX: Correctly re-attach allowed images in activity summary e-mail (#26642) 2024-04-18 10:27:46 +08:00
models DEV: Delete upload references on draft cleanup (#26877) 2024-05-06 14:08:10 +08:00
serializers DEV: Add more structure for admin plugin config nav (#26707) 2024-05-02 11:36:46 +10:00
services FIX: Make `getCategoryIdByName` theme migration helper case insensitive (#26878) 2024-05-06 12:42:58 +08:00
views FEATURE: Add experimental tracking of 'real browser' pageviews (#26647) 2024-04-25 11:00:01 +01:00