Roll v0.1.0 API Reference
Modules
Roll is a tool intended for use in executing sql migrations that move data between tables and that are only used to make a refactor.
Lower level API for managing migrations.
Defines a schema that works with a table that tracks schema migrations.
The table name defaults to roll_migrations
.
Mix Tasks
Prints Roll tasks and their information. mix roll
Generates a migration.
The repository must be set under :ecto_repos
in the
current app configuration or given via the -r
option.
Runs the pending migrations for the given repository.
Migrations are expected at “priv/YOUR_REPO/migrations” directory
of the current application, where “YOUR_REPO” is the last segment
in your repository name. For example, the repository MyApp.Repo
will use “priv/repo/roll”. The repository Whatever.MyRepo
will use “priv/my_repo/roll”.
You can configure a repository to use another directory by specifying
the :priv
key under the repository configuration. The “migrations”
part will be automatically appended to it. For instance, to use
“priv/custom_repo/roll”
Displays the up / down migration status for the given repository.
The repository must be set under :ecto_repos
in the
current app configuration or given via the -r
option.
By default, migrations are expected at “priv/YOUR_REPO/roll”
directory of the current application but it can be configured
by specifying the :priv
key under the repository configuration.
If the repository has not been started yet, one will be
started outside our application supervision tree and shutdown
afterwards.