Oban.Met.Migration (Oban Met v1.0.0)
Migrations that add estimate functionality.
Migrations Are Not Required
Met will create the necessary estimate function automatically when possible. This migration isn't necessary under normal circumstances, but is provided to avoid permission issues or allow full control over database changes.
See the section on Explicit Migrations for more information.
Usage
To use migrations in your application you'll need to generate an Ecto.Migration
that wraps
calls to Oban.Met.Migration
:
mix ecto.gen.migration add_oban_met
Open the generated migration and delegate the up/0
and down/0
functions to
Oban.Met.Migration
:
defmodule MyApp.Repo.Migrations.AddObanMet do
use Ecto.Migration
def up, do: Oban.Met.Migration.up()
def down, do: Oban.Met.Migration.down()
end
This will run all of the necessary migrations for your database.
Summary
Functions
Run the down
migration.
Example
Run all migrations up to the current version:
Oban.Met.Migration.down()
Run migrations in an alternate prefix:
Oban.Met.Migration.down(prefix: "payments")
Run the up
migration.
Example
Run all migrations up to the current version:
Oban.Met.Migration.up()
Run migrations in an alternate prefix:
Oban.Met.Migration.up(prefix: "payments")