Ecto v2.2.10 mix ecto.dump View Source

Dumps the current environment’s database structure for the given repository into a structure file.

The repository must be set under :ecto_repos in the current app configuration or given via the -r option.

This task needs some shell utility to be present on the machine running the task.

DatabaseUtility needed
PostgreSQLpg_dump
MySQLmysqldump

Example

mix ecto.dump

Command line options

  • -r, --repo - the repo to load the structure info from
  • -d, --dump-path - the path of the dump file to create
  • -q, --quiet - run the command quietly

Link to this section Summary

Functions

A task needs to implement run which receives a list of command line args

Link to this section Functions

A task needs to implement run which receives a list of command line args.

Callback implementation for Mix.Task.run/1.