Fix projects stuck in hashed migration storage
USE AT YOUR OWN RISK: Although this script has proven to work on our system, there is no guarantee it will also work for you. Adapt it so it does a "dry-run" on one project or one shard, before you run it on all projects.
Some projects failed to save to the database after their repo was migrated to the database. This snippets finds those and updates them.
Snippet was originally created at https://gitlab.com/gitlab-com/gl-infra/infrastructure/snippets/1799586