Add checksum into vulnerability_remediations table
What does this MR do?
This MR introduces a new column called checksum
for the vulnerability_remediations
table which is already empty. This column will be used to store the checksum value of the attached diff
file to identify the diff
uniquely.
Related to #239177
Database Migration
Please note that there are two cops disabled in the migration as the table is already empty.
rake db:migrate
== 20201119164605 AddChecksumIntoVulnerabilityRemediations: migrating =========
-- add_column(:vulnerability_remediations, :checksum, :binary, {:null=>false, :comment=>"Stores the SHA256 checksum of the attached diff file"})
-> 0.0042s
-- add_index(:vulnerability_remediations, :checksum, {:unique=>true})
-> 0.0047s
== 20201119164605 AddChecksumIntoVulnerabilityRemediations: migrated (0.0090s)
rake db:migrate:down
== 20201119164605 AddChecksumIntoVulnerabilityRemediations: reverting =========
-- remove_index(:vulnerability_remediations, {:column=>:checksum})
-> 0.0050s
-- remove_column(:vulnerability_remediations, :checksum, :binary, {:null=>false, :comment=>"Stores the SHA256 checksum of the attached diff file"})
-> 0.0021s
== 20201119164605 AddChecksumIntoVulnerabilityRemediations: reverted (0.0089s)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
- [-] Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
- [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team