Log time it took to execute each migration on production

Description

As an engineer I would like to find a log about executing migrations I wrote. To understand how long it actually took to execute my migrations on gitlab.com and how is this related to the time it took to execute these migrations in the database-lab.

Problem

Right now we do not ingest data about migrations into Elastic. We only log duration it took to execute all migrations within a deployment, but this is not that useful.

I would like to know how long each migrations took to execute, preferably by finding this information using a migration number. Right now I need to find a CI build log with the output of bin/rails db:migrate, but I presumably don't even have access to such pipelines in the Ops GitLab instance.

Proposal

Make it possible to output a structured log from bin/rails db:migrate with per-migration payload, and ingest it into Elastic.

/cc @skarbek @nolith @andrewn @darbyfrey