mix rheo.ecto.gen_migration (rheo v1.0.0)

Copy Markdown View Source

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.