# `PgFlow.Migrations.Versions.V03`
[🔗](https://github.com/agoodway/pgflow/blob/v0.3.1/lib/pgflow/migrations/versions/v03.ex#L1)

PgFlow extensions migration version 3.

Adds `attempts_count` to the `step_task_record` composite type and replaces
`start_tasks` with the upstream body plus that column, so a dispatched task
carries the attempt it is on and `PgFlow.Context.attempt` can stop reporting a
hardcoded `1`.

Deploy the worker before applying this: `PgFlow.Worker.TaskRow` reads both the
seven- and eight-column row, but a worker that predates it matches seven
positionally and would fail every dispatch against the wider record. See
`priv/pgflow_helpers/sql/versions/v03/v03_up.sql` for why the returned value is
the stored count plus one.

# `down`

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

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

# `up`

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

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
