Skip to content

Add background migration to fill file stores from `NULL` to `1`

What does this MR do?

In !31261 (merged) we added the NOT NULL constraint with validate: false on file store columns for the following tables: ci_job_artifacts, lfs_objects, and uploads. This MR adds migrations to fill potential invalid records and validate constraints.

We already performed a background migration in the past gitlab-foss!18557 (merged) to fill file stores for these tables, but at that time we not added the NOT NULL constraint. Since the record count is low for these tables, we are now filling the file stores using a regular migration.

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

Related issues

#218004 (closed)

Edited by Douglas Barbosa Alexandre

Merge request reports