View Source migraterl_sup (migraterl v0.5.0)

Top-level supervisor.

Starts one long-lived migraterl_watcher per entry in the watchers application environment, so a host application can enable "auto-migrate on change" purely through configuration:

{migraterl, [
    {watchers, [
        #{conn => #{host => "127.0.0.1", username => "app"},
          debounce_ms => 300,
          migrate => #{namespace => <<"app">>,
                       sources => [{once, "priv/migrations/schema"}]}}
    ]}
]}

With no watchers configured the supervisor runs empty: each migration then spawns its own transient runner (see migraterl_runner) and nothing is kept alive.

Summary

Functions

init/1

start_link()