# `mix rheo.ecto.gen_migration`
[🔗](https://github.com/thanos/rheo/blob/v1.0.0/lib/mix/tasks/rheo.ecto.gen_migration.ex#L3)

Generates an `Ecto.Migration` in the host app that creates Rheo's tables.

Use this when you would rather manage the Rheo schema with `mix ecto.migrate`
than let `Rheo.ensure_indexes/1` create tables on demand.

    mix rheo.ecto.gen_migration
    mix rheo.ecto.gen_migration --repo MyApp.Repo --name add_rheo_tables

## Options

  * `--repo` — repo module used to name the migration and locate
    `priv/<repo>/migrations` (default: the first entry in
    `config :my_app, ecto_repos: [...]`)
  * `--name` — migration file name (default `create_rheo_tables`)
  * `--migrations-path` — explicit output directory

The generated migration delegates to `Rheo.Backend.Ecto.Migrations`, so a Rheo
upgrade that changes the schema ships new DDL without rewriting your file.

---

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