Skip to content
  • Jamie Tanna's avatar
    feat: add `advisories` table for all advisories data · fe4efc69
    Jamie Tanna authored and Jamie Tanna's avatar Jamie Tanna committed
    Similar to the `policy_violations` table, this introduces a single view
    of all Advisories data that affects the dependencies in the database.
    
    This makes it simpler to query all package advisories by "simply"
    querying the `advisories` table, which includes all relevant information
    for package advisories.
    
    This allows us to remove a lot of duplication in our SQL queries for
    looking up advisories data, making sure that it's a much simpler process
    for querying data.
    
    We can still directly query the tables as before - following the example
    from `RetrievePackageAdvisoriesFromSeparateTables` - if we need to.
    
    We can also remove the references in `policy_violations` that indicates
    that `policy_violations` is better than `advisories`, as it no longer
    is!
    
    Because we want to make it easier to surface the `eol_from` and
    `supported_until` dates, too, we should add them as nullable fields to
    `advisories` - and defaulting it as `NULL` for tables that don't surface
    the data.
    
    Closes #414.
    fe4efc69