mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 05:02:24 +08:00
9655bf3e24
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. |
||
---|---|---|
.. | ||
20230823095931_add_limit_to_user_second_factor_name.rb | ||
20230823100627_add_limit_to_user_security_key_name.rb | ||
20230926165821_drop_post_uploads_table.rb | ||
20231120190818_trigger_post_rebake_category_style_quotes.rb | ||
20231127165331_trigger_auto_linking_for_videos_since_placeholder.rb | ||
20240108022138_change_enable_admin_sidebar_to_group_post_migration.rb | ||
20240110040813_fill_skip_review_media_groups_based_on_deprecated_setting.rb | ||
20240112043325_fill_embedded_media_post_allowed_groups_based_on_deprecated_setting.rb | ||
20240202052058_drop_badge_image_column.rb | ||
20240212034010_drop_deprecated_columns.rb | ||
20240506035024_clear_orphaned_draft_upload_references.rb |