Check records and finalize the migrations to fill users/user_preferences
This is a follow-up of #388393 (closed).
This is steps 2 & 3 of making users and user_preferences columns NOT NULL.
Implementation plan
- After the background migrations introduced in !125881 (diffs) & !125774 (diffs) have been completed, check that all the records have NOT NULL values using the below queries on a production clone:
Queries
SELECT COUNT(*)
FROM users
WHERE project_view IS NULL
OR hide_no_ssh_key IS NULL
OR hide_no_password IS NULL
OR notified_of_own_activity IS NULL;
SELECT COUNT(*)
FROM user_preferences
WHERE tab_width IS NULL
OR time_display_relative IS NULL
OR render_whitespace_in_code IS NULL;
- If there are records will NULL attribute then create a new issue to investigate what is setting those columns to NULL and then reschedule the background migrations introduced in !125881 (merged), !125774 (merged) to fix those records. Otherwise, continue with the below steps.
- Create an MR to finalize the migrations introduced in !125881 (diffs) & !125774 (diffs): Sample migration.
Next work on #417576 (closed).
Edited by Abdul Wadood