Endurant

TODO: Add description

Migrations

Endurant uses host-application wrapper migrations. In your app, generate a migration and call Endurant.Migration from up/0 and down/0.

defmodule MyApp.Repo.Migrations.AddEndurant do
  use Ecto.Migration

  def up do
    Endurant.Migration.up(version: 1)
  end

  def down do
    Endurant.Migration.down(version: 1)
  end
end

When Endurant introduces a new migration version, add another host migration:

defmodule MyApp.Repo.Migrations.UpgradeEndurantToV2 do
  use Ecto.Migration

  def up do
    Endurant.Migration.up(version: 2)
  end

  def down do
    Endurant.Migration.down(version: 1)
  end
end

Migrated version tracking uses a comment on endurant_executions.

Installation

If available in Hex, the package can be installed by adding endurant to your list of dependencies in mix.exs:

def deps do
  [
    {:endurant, "~> 0.1.0"}
  ]
end

TODO