clay/amphora-storage-postgres

Setup migration on command

Opened this issue · 1 comments

Is your feature request related to a problem? Please describe.

As of now, the migration process runs automatically when the clay instance is started which could introduce potential threats that could eat up all of the DB resources grinding up things to a halt.

Describe the solution you'd like

One way we could avoid this is create a command to run migrations when the user demands it instead of running them automatically on startup. It could be a claycli command which triggers the migrations from amphora-storage-postgres (i.e.: clay migrate <namespace>) that still haven't been completed. This would require changes in amphora-storage-postgres and claycli.

Additional context

This issue was raised after developing and discussing about issue #33