mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 03:06:53 +08:00

Currently we don’t have an association between reviewables and posts. This sometimes leads to inconsistencies in the DB as a post can have been deleted but an associated reviewable is still present. This patch addresses this issue simply by adding a new association to the `Post` model and by using the `dependent: :destroy` option.