Pollard.Runner (pollard v0.1.0)

Copy Markdown View Source

Discovers and executes pending data transforms.

The runner acquires a lock (to prevent concurrent execution), discovers transform files, checks which have already been applied, and executes pending ones in version order. Each transform block within a file runs in its own database transaction.

Options

  • :migration_source - Name of the tracking table. Defaults to "transforms".
  • :lock - Lock module implementing Pollard.Lock. Defaults to Pollard.Lock.Postgres.
  • :log - Whether to log transform execution. Defaults to true.

Any extra options are forwarded to the lock module's acquire/2 and release/2 callbacks.

Summary

Functions

Run all pending transforms found at path against repo.

Functions

run(repo, path, opts \\ [])

Run all pending transforms found at path against repo.

Pollard.Runner.run(MyApp.Repo, "priv/repo/transforms")