Remove presence validator on name on WebauthnRegistration
What does this MR do and why?
This fix is being made as per the discussion and findings from &4061 (comment 726298377) (and the rest of the thread)
The major details (summarized) are:
- 
We are in the process of moving from U2ftoWeb Authenticationfor 2FA. (#22506 (closed))
- 
As part of this, we have introduced an after_commitcallback onU2fRegistrationmodel named create_webauthn_registration, that creates a newWebauthnRegistrationrecord for the correspondingU2fRegistrationrecord. We also ran a migration to create corresponding records of existingU2fRegistrationrecords.
- 
This change was deployed a while ago. 
- 
While most of the corresponding records were created successfully via the callback and the migration, we noticed that 70U2fRegistrationrecords on gitlab.com database are missing the correspondingWebauthnRegistrationrecords.
- 
On further investigation, we noticed that 64 out of the 70 of these records failed to create the new records because: - The U2fRegistrationrecords had itsnameas blank (' '). This is allowed as per the db, because the attribute isname character varyingon this table. So it allows bothNULLandblankvalues forname.
- But on WebauthnRegistration, we had apresencevalidator onname, that does not allow blank values.
- At the db level, we have WebauthnRegistration's name attribute asname text NOT NULL
- 
NOT NULLconstraint allowsblankstrings as names.
- So, for the migration to take place successfully, the blanknames inU2fRegistrationshould becomeblanknames onWebauthnRegistrationrecords. And for that to work, we should remove the presence validator onnamefromWebauthnRegistration, which is what this MR does.
- And it also replaces the presencevalidator onnamewith anot nullvalidator.
- This will make sure that these 64 records will have its corresponding WebauthnRegistrationrecord created if we run the background migration again.
 
- The 
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
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.