Add Vulnerabilities External Link model
What does this MR do?
Related to #276897 (closed)
This change adds new model to database to store external links for vulnerabilities (ie. information about created issues in Jira).
Migrations
== 20201124075951 CreateVulnerabilityExternalLinks: migrating =================
-- create_table(:vulnerability_external_issue_links, {:if_not_exists=>true})
-> 0.0145s
-- transaction_open?()
-> 0.0000s
-- current_schema()
-> 0.0002s
-- execute("ALTER TABLE vulnerability_external_issue_links\nADD CONSTRAINT check_68cffd19b0\nCHECK ( char_length(external_project_key) <= 255 )\nNOT VALID;\n")
-> 0.0004s
-- current_schema()
-> 0.0002s
-- execute("SET statement_timeout TO 0")
-> 0.0002s
-- execute("ALTER TABLE vulnerability_external_issue_links VALIDATE CONSTRAINT check_68cffd19b0;")
-> 0.0005s
-- execute("RESET ALL")
-> 0.0002s
-- transaction_open?()
-> 0.0000s
-- current_schema()
-> 0.0002s
-- execute("ALTER TABLE vulnerability_external_issue_links\nADD CONSTRAINT check_3200604f5e\nCHECK ( char_length(external_issue_key) <= 255 )\nNOT VALID;\n")
-> 0.0004s
-- current_schema()
-> 0.0002s
-- execute("ALTER TABLE vulnerability_external_issue_links VALIDATE CONSTRAINT check_3200604f5e;")
-> 0.0004s
== 20201124075951 CreateVulnerabilityExternalLinks: migrated (0.0276s) ========
== 20201124075951 CreateVulnerabilityExternalLinks: reverting =================
-- drop_table(:vulnerability_external_issue_links)
-> 0.0126s
== 20201124075951 CreateVulnerabilityExternalLinks: reverted (0.0189s) ========
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
Edited by Alan (Maciej) Paruszewski