[go: up one dir, main page]

Introduce vulnerability archival process related entities

Why are we doing this work

As part of the MVC, we have decided to keep the archived vulnerabilities in the PostgreSQL database as it will make it easier to manage transactions, etc. and in this issue, we want to introduce the required entities to store the vulnerability archival data.

Implementation plan

  • database, backend Introduce the following entities
    • Vulnerabilities::Archive
      • id serial
      • project_id bigint not null
      • date date not null
      • timestamps
    • Vulnerabilities::ArchivedRecord
      • id serial
      • project_id bigint not null(sharding key)
      • archive_id bigint not null FK on delete cascade
      • vulnerability_id bigint not null
      • data jsonb not null
      • timestamps

Important: The JSONB data attribute of the Vulnerabilities::ArchivedRecord entity must comply with the vulnerability export file structure.

Verification steps

  • Verify that the tables are created on production database.