# `mix durable_object.gen.migration`
[🔗](https://github.com/ChristianAlexander/durable_object/blob/v0.3.2/lib/mix/tasks/durable_object.gen.migration.ex#L2)

Generates an upgrade migration for DurableObject.

This task scans your existing migrations to find the highest DurableObject
migration version already applied, then generates a new migration to upgrade
to the latest version.

## Usage

    mix durable_object.gen.migration

## Options

* `--repo` - The Ecto repo to use (defaults to auto-detected repo)

## Example

If your project has a migration with `DurableObject.Migration.up(version: 2)`,
running this task will generate:

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

      def up, do: DurableObject.Migration.up(base: 2, version: 3)
      def down, do: DurableObject.Migration.down(base: 2, version: 3)
    end

---

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