discourse/db
Ted Johansson c4d0bbce62
DEV: Delete upload references upon deleting draft (#22851)
We currently are accumulating orphaned upload references whenever drafts are deleted.

This change deals with future cases by adding a dependent strategy of delete_all on the Draft#upload_references association. (We don't really need destroy strategy here, since UploadReference is a simple data bag and there are no validations or callbacks on the model.)

It deals with existing cases through a migration that deletes all existing, orphaned draft upload references.
2023-07-31 10:16:23 +08:00
..
fixtures UX: Update badge icons (#20462) 2023-02-28 10:42:05 +08:00
migrate DEV: Delete upload references upon deleting draft (#22851) 2023-07-31 10:16:23 +08:00
post_migrate DEV: Promote historic post_deploy migrations 2023-07-26 10:36:37 +02:00
api_test_seeds.rb DEV: Apply syntax_tree formatting to `db/*` 2023-01-09 11:59:41 +00:00