View Source Dagex.Migrations (dagex v2.0.0)
Migrations create and modify the database tables Dagex needs to function.
mix ecto.gen.migration add_dagex
Open the generated migration in your editor and call the
down functions on
defmodule MyApp.Repo.Migrations.AddDagex do use Ecto.Migration def up, do: Dagex.Migrations.up() def down, do: Dagex.Migrations.down() end
This will run all of Dagex's versioned migrations for your database. Migrations between versions are idempotent. As new versions are released you may need to run additional migrations.
Now, run the migration to create the table:
Link to this section Summary
Link to this section Functions
down(opts :: keyword()) :: :ok
down changes for all migrations between the current version and the initial version.
Run all migrations from current version down to the first:
Run migrations down to a specified version:
up(opts :: keyword()) :: :ok
up changes for all migrations between the initial version and the current version.
Run all migrations up to the current version:
Run migrations up to a specified version: