feat: show elapsed time when applying up/down schema migrations with CLI
So far, when applying database schema migrations with the registry CLI, we have no idea of how much time these operations took. This MR changes that by measuring the elapsed time for up
and down
commands.
❯ ./bin/registry database migrate down -n 1 _local/config.yml
20221123174403_post_add_layers_simplified_usage_index_batch_1
Preparing to apply the above down migrations. Are you sure? [y/N] y
OK: applied 1 migrations in 0.019s
❯
❯ ./bin/registry database migrate up _local/config.yml
20221123174403_post_add_layers_simplified_usage_index_batch_1
OK: applied 1 migrations in 0.014s
Note the in Xs
.