AlmaLinux / build-system

The AlmaLinux OS project Build System documentation and issue tracker.
Creative Commons Attribution Share Alike 4.0 International
27 stars 10 forks source link

Adjust errata records data model in order to allow creating new advisories #364

Closed javihernandez closed 4 days ago

javihernandez commented 1 month ago

This is our current data model for NewErrataRecords

        Column        |            Type             | Collation | Nullable | Default 
----------------------+-----------------------------+-----------+----------+---------
 id                   | text                        |           | not null | 
 platform_id          | integer                     |           | not null | 
 module               | text                        |           |          | 
 release_status       | erratareleasestatus         |           | not null | 
 last_release_log     | text                        |           |          | 
 summary              | text                        |           |          | 
 solution             | text                        |           |          | 
 freezed              | boolean                     |           |          | 
 issued_date          | timestamp without time zone |           | not null | 
 updated_date         | timestamp without time zone |           | not null | 
 description          | text                        |           |          | 
 original_description | text                        |           | not null | 
 title                | text                        |           |          | 
 oval_title           | text                        |           |          | 
 original_title       | text                        |           | not null | 
 contact_mail         | text                        |           | not null | 
 status               | text                        |           | not null | 
 version              | text                        |           | not null | 
 severity             | text                        |           | not null | 
 rights               | text                        |           | not null | 
 definition_id        | text                        |           | not null | 
 definition_version   | text                        |           | not null | 
 definition_class     | text                        |           | not null | 
 affected_cpe         | jsonb                       |           | not null | 
 criteria             | jsonb                       |           |          | 
 original_criteria    | jsonb                       |           |          | 
 tests                | jsonb                       |           |          | 
 original_tests       | jsonb                       |           |          | 
 objects              | jsonb                       |           |          | 
 original_objects     | jsonb                       |           |          | 
 states               | jsonb                       |           |          | 
 original_states      | jsonb                       |           |          | 
 variables            | jsonb                       |           |          | 
 original_variables   | jsonb                       |           |          | 

As you can see there are some OVAL-specific and non-nullable fields that we need to convert into nullable ones. This way, we support errata creation payloads for our own AlmaLinux security advisories