discourse/spec
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
..
fabricators FEATURE: Allow watched words to be created as a group (#26632) 2024-04-29 15:50:55 +05:30
fixtures DEV: Support translations for property labels in objects schema editor (#26362) 2024-03-28 10:53:51 +08:00
generator DEV: Silence the output of migration specs (#26365) 2024-03-26 11:32:44 +01:00
helpers FIX: Include HTML content for authenticated users with crawler UA (#26757) 2024-04-25 22:41:57 +01:00
import_export DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
initializers DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
integration Revert "FIX: Post uploads setting access_control_post_id unnecessarily (#26627)" (#26643) 2024-04-16 14:10:25 +10:00
integrity Enable Embroider/Webpack code spliting for Wizard (#24919) 2023-12-20 13:15:06 +00:00
jobs FIX: Move user reindexing into a job (#26753) 2024-04-25 20:58:34 +08:00
lib FIX: Handle tags with underscores correctly (#26839) 2024-05-01 20:01:39 -05:00
mailers FIX: Correctly re-attach allowed images in activity summary e-mail (#26642) 2024-04-18 10:27:46 +08:00
migrations DEV: Silence the output of migration specs (#26365) 2024-03-26 11:32:44 +01:00
models DEV: Delete upload references on draft cleanup (#26877) 2024-05-06 14:08:10 +08:00
multisite DEV: Add S3 upload system specs using minio (#22975) 2023-08-23 11:18:33 +10:00
requests FIX: missing route for edit components (#26874) 2024-05-06 14:27:30 +10:00
script/import_scripts DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
serializers FIX: Serialize categories for bookmarks (#26606) 2024-04-17 17:23:47 +03:00
services FIX: Make `getCategoryIdByName` theme migration helper case insensitive (#26878) 2024-05-06 12:42:58 +08:00
support DEV: Introduce `run_theme_migration` spec helper in test environment (#26845) 2024-05-03 06:29:18 +08:00
system FEATURE: revert redirect from wizard to guide (#26873) 2024-05-06 14:56:35 +10:00
tasks DEV: Improve test coverage of `themes:update` rake task (#26764) 2024-04-26 10:04:15 +08:00
views FEATURE: Simplify crawler content for non-canonical post URLs (#26324) 2024-03-26 15:18:46 +00:00
rails_helper.rb DEV: Add pry-stack_explorer again (#26763) 2024-04-29 10:34:28 +10:00
regenerate_swagger_docs DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
swagger_helper.rb DEV: Bump rswag-specs from 2.11.0 to 2.13.0 (#24654) 2023-12-07 08:16:47 +08:00