Draft: Ignore vulnerability_reads.id before removal
What does this MR do and why?
This MR adds ignores the id column from the vulnerability_reads table.
The vulnerability_reads table currently has both an id column and uses vulnerability_id as the primary key. This design causes several issues:
-
Rails 7.2 Compatibility: Rails treats
idas a special attribute that maps to the primary key, causing issues with bulk insert operations (as seen in !209592 (merged)) -
Confusion: Having both
idandvulnerability_idcolumns where onlyvulnerability_idis used as the primary key creates confusion -
Unnecessary Storage: The
idcolumn serves no functional purpose since all operations usevulnerability_id
Benefits of removing the id column:
- Resolves Rails 7.2 bulk insert compatibility issues
- Reduces table size and index overhead
- Eliminates confusion about which column is the actual primary key
- Simplifies the model structure
References
- Related issue: #357262
- Context from MR: !209592 (merged) (Fix bulk insert of vulnerability reads in Rails 7.2)
- MR to drop the column: !209790