Skip to content

Remove merge_request_diffs.st_{commits,diffs}

On GitLab.com, there are only six non-null, non-empty (from imports) values remaining: https://gitlab.com/gitlab-com/infrastructure/issues/3068

That means we can do a final cleanup, and then remove these columns!

This means:

  1. All references to st_diffs and st_commits in MergeRequestDiff can be removed.
  2. MergeRequest#all_commit_shas can return a relation for use in #all_pipelines, avoiding loading any values in Ruby at all.
  • Note that because merge_request_diff_commits.sha is bytea and pipelines.sha is text, we'll need to either do SELECT encode(sha, 'escape') FROM merge_request_diff_commits on Postgres, or change the type of pipelines.sha.