Add security_projects_tracked_context_id to ref contextual tables

A number of tables need to be able to track their specific ref context. As such, we need to add a security_projects_tracked_context_id reference to these tables to enable them to be related to their particular branch/tag context.

  • vulnerability_occurrences
  • vulnerability_reads
  • vulnerability_statistics
  • vulnerability_historical_statistics

NOTE: vulnerability_namespace_historical_statistics will not receive a security_projects_tracked_context_id column, as branch names across namespaces are not guaranteed to match.

Because these tables already exist, this column must be nullable initially and cannot be a foreign key yet, but we will implement code to fill it, backfill, and the implement constraints on them in follow up issues.

Edited by 🤖 GitLab Bot 🤖