Add background migration to fill file stores from `NULL` to `1`
requested to merge 213382-add-migration-to-do-a-final-update-of-the-potential-null-values into master
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
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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
Edited by Douglas Barbosa Alexandre