SuperPi.Repo.Migrator (super_pi v0.1.0)

Copy Markdown View Source

Applies pending migrations when the application starts, so a fresh checkout works without a separate mix ecto.migrate step.

Start it right after the repo. It returns :ignore once the migrations have run, so it never stays in the supervision tree. Disable it with config :super_pi, auto_migrate: false. For PostgreSQL the database must already exist; only the schema is created.

Summary

Functions

Runs every pending migration on the active repo and returns the versions applied.

Functions

child_spec(opts)

migrate!()

Runs every pending migration on the active repo and returns the versions applied.

start_link(opts)