PgFlow.Migrations.Versions.V04 (PgFlow v0.3.1)

Copy Markdown View Source

PgFlow extensions migration version 4.

Narrows recover_stalled_tasks/1 to tasks pgflow.start_tasks could actually dispatch again: the run must be started and the task's step_states row must be started.

Without the step-state guard, a map step that skips via when_exhausted strands its siblings in startedfail_task archives their messages but never terminalizes the task rows — and the sweep requeued those orphans on an already-completed run. See priv/pgflow_helpers/sql/versions/v04/v04_up.sql for the full rationale.

Summary

Functions

Rolls back this version's migration by executing the down SQL file.

Applies this version's migration by executing the up SQL file.

Functions

down(opts \\ [])

@spec down(keyword()) :: :ok

Rolls back this version's migration by executing the down SQL file.

up(opts \\ [])

@spec up(keyword()) :: :ok

Applies this version's migration by executing the up SQL file.