Phoenix/Ecto v4.1.0 Phoenix.Ecto.CheckRepoStatus View Source

A plug that does some checks on your application repos.

Checks if the storage is up (database is created) or if there are any pending migrations. Both checks can raise an error if the conditions are not met.

Plug options

  • :otp_app - name of the application which the repos are fetched from
  • :get_migration_function - function that returns the migrations for a given repo. Should return a list of tuples with three elements, e.g. [{state :: :up | :down, version :: integer(), name :: String.t()]] If ecto_sql dependency is loaded, uses Ecto.Migrator.migrations/1 by default.

Link to this section Summary

Functions

Callback implementation for Plug.call/2.

Callback implementation for Plug.init/1.

Link to this section Functions

Callback implementation for Plug.call/2.

Callback implementation for Plug.init/1.