Swap todos.note_id to bigint for self-managed instances
What does this MR do and why?
This MR swaps thetodos.note_id
and todos.note_id_convert_to_bigint
columns for self-managed instances. This was already done for GitLab.com with Swap todos.note_id to bigint (!118123 - merged). The process is outlined here.
The timeline for GitLab.com was the following:
- 15.9 Initialize the conversion of todos.note_id to b... (!110704 - merged)
- 16.0 Swap todos.note_id to bigint (!118123 - merged)
- 16.1 Cleanup PK conversion for few notes related tables (!123108 - merged)
Since we made the decision to commit schema changes to structure.sql
for the above MRs, we now need to take into account 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, and 15.11 - swap the columns
- Instances created from 16.0 - 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 clean up is done (no more temp column and trigger)
Related to Swap integer and bigint columns for notes and d... (#417402 - closed).
How to set up and validate locally
I have done the following manual testing:
- Create new instance from each of 15.8.0, 15.9.0, 16.0.0, and 16.1.0
- Upgrade all instances to 16.1.2
- Execute the migrations from this MR
- Verify migrations execute successfully and
todos
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.
-
I have evaluated the MR acceptance checklist for this MR.