mix durable_object.gen.migration (DurableObject v0.2.1)

Copy Markdown View Source

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