Skip to content

Perform unattended init and migration on application startup #270

@yangm97

Description

@yangm97

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions