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 PopulateCanPushFromDeployKeysProjects and PostPopulateCanPushFromDeployKeysProjects.

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?

What are the relevant issue numbers?

Ref #42112 (closed)

Merge request reports