Skip to content

Swap commit_user_mentions.note_id for self-managed instances

Leonardo da Rosa requested to merge 417402/commit-user-mentions/note-id into master

What does this MR do and why?

This MR swaps thecommit_user_mentions.note_id and commit_user_mentions.note_id_convert_to_bigint columns for self-managed instances. This was already done for GitLab.com with !117343 (merged).

The process is outlined here.

The timeline for GitLab.com was the following:

Since we decided to commit schema changes to structure.sql for the above MR's, we now need to consider the state of the schema from which the self-managed instance was created.

We have the following cases:

  • Instances created from 15.8 and prior – swap the columns
  • Instances created from 15.9, 15.10 – swap the columns
  • Instances created from 15.11 – do not swap as the columns are already swapped
  • Instances created from 16.1 – do not swap as the columns are already swapped, and the cleanup is done (no more temp column and trigger)

Related to #417402 (closed)

How to set up and validate locally

I have done the following manual testing:

  1. Create a new instance from each of 15.8.0, 15.9.0, 15.11, and 16.1.0
  2. Upgrade all instances to 16.1.2
  3. Execute the migrations from this MR
  4. Verify migrations execute successfully and commit_user_mentions table has the expected schema.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Leonardo da Rosa

Merge request reports

Loading