# `mix ash_onetime.gen.migrations`
[🔗](https://github.com/baselabs/ash_onetime/blob/v1.5.0/lib/mix/tasks/ash_onetime.gen.migrations.ex#L1)

Generates the PostgreSQL objects required by `ash_onetime`.

    mix ash_onetime.gen.migrations --repo MyApp.Repo
    mix ash_onetime.gen.migrations --repo MyApp.Repo --claims hash --claim-partitions 8

Use `--tenants` to write to the repo tenant migration directory.

# `render`

```elixir
@spec render(module(), keyword()) :: binary()
```

Renders the install migration deterministically for explicit options.

# `render_logical_partition_upgrade`

```elixir
@spec render_logical_partition_upgrade(module(), keyword()) :: binary()
```

Renders the reversible logical-partition upgrade for an existing installation.

# `render_roll_forward`

```elixir
@spec render_roll_forward(module(), keyword()) :: binary()
```

Renders the SEC-5/SEC-6 forward migration deterministically for existing installs: the
response_partition index, a back-fill of monthly partitions from `partition_start` through
`partition_start + months`, and the past-retention DEFAULT drain. Pure (no filesystem writes).

---

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