Story #3934

Updated by daviddavis about 3 years ago

h2. Problem

It's possible that erratum records can mutate. We need to support this by storing a new erratum record in the database when this happens. These erratum records will have the same erratum id (e.g. RHSA-2018:2557).

h2. Solution

* Define the natural key for UpdateRecords as all the fields on the UpdateRecord (except pk).
* Make sure we're storing a new record when an erratum changes. This includes changes to the erratum's collections or packages. The <code>digest</code> field on UpdateRecord should indicate if two erratum records are the same or not.
* Add a step during sync to remove duplicate errata for a repository. Duplicates are errata that shares the same errata id. This could be a new DeclarativeVersion stage.

While it's not a requirement for this task, we should think about how we can generalize this solution for other plugins.