Skip to content

Split up the int column conversion helpers

What does this MR do?

Related: #300915 (closed), #288004 (closed)

Split the migration helper used to kickoff an integer-to-bigint column conversion into two separate methods that will be called as two independent steps.

The existing method (and first step) initialize_conversion_of_integer_to_bigint will add the new temporary bigint column, and install the triggers to keep the column in sync with the existing column.

The new method (and second step) backfill_conversion_of_integer_to_bigint will create the batched_background_migration record that will be used to run the backfill of the temporary column.

Keeping this as two steps allows the schema changes to be made in a pre-deployment migration, while the background migration can be added in a post-deployment migration.

Also update the helpers to run the background migration inline in test/dev environments.

The helpers will first be used in the follow up MR: !51332 (merged)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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 Mayra Cabrera

Merge request reports