[10.1] Fix bug in security release with deploy keys migration
What does this MR do?
Fix a bug in the security release related to the migrations
Why was this MR needed?
With Mysql databases these migrations fails. It wasn't discovered through the usual development workflow because the queries are performed only if any
DeployKeysProject exists, and in the pipeline tests there isn't any
Does this MR meet the acceptance criteria?
- Changelog entry added, if necessary
- Documentation created/updated
- API support added
- Tests added for this feature/bug
- Has been reviewed by UX
- Has been reviewed by Frontend
- Has been reviewed by Backend
- Has been reviewed by Database
- Conform by the merge request performance guides
- Conform by the style guides
- Squashed related commits together
- Internationalization required/considered
What are the relevant issue numbers?
Ref #42112 (closed)