Revaluate opportunities to improve `migrate_old_registry` job in the registry's `migrate.yml` ci pipeline

Context

The migrate_old_registry job in the registry's CI pipeline (migrate.yml) is complex and involves multiple steps, including interacting with Docker-in-Docker (DinD) services, PostgreSQL, and running database migrations. While the job currently functions as expected, there are a few areas where improvements can be made to increase reliability, maintainability, and efficiency.

Goals

  • Improve the reliability and performance of the migrate_old_registry job.
  • Simplify the workflow where possible to reduce complexity.
  • Improve maintainability and clarity of the script.