I'm looking into using commanded on embedded/edge/IoT devices (i.e. nerves) so it is not possible to run the init/create mix tasks before starting the BEAM, even if compiled as a release task. So migrations need to run during application startup, as a process.
An implementation of such feature can be seen in Ecto.Migrator. It provides a process that can be attached to the supervision tree to ensure the database schema is up to date.
I'm looking into using commanded on embedded/edge/IoT devices (i.e. nerves) so it is not possible to run the init/create mix tasks before starting the BEAM, even if compiled as a release task. So migrations need to run during application startup, as a process.
An implementation of such feature can be seen in Ecto.Migrator. It provides a process that can be attached to the supervision tree to ensure the database schema is up to date.
https://hexdocs.pm/ecto_sql/Ecto.Migrator.html#module-example-running-migrations-on-application-startup