Literature.Migrations (literature v0.1.13)

Migrations create the database tables Literature needs.

usage

Usage

To use migrations in your application you'll need to generate an Ecto.Migration that wraps calls to Literature.Migrations:

mix ecto.gen.migration add_literature

Open the generated migration in your editor and call the up and down functions on Literature.Migrations:

defmodule MyApp.Repo.Migrations.AddLiterature do
  use Ecto.Migration
  
  def up, do: Literature.Migrations.up()
  
  def down, do: Literature.Migrations.down()
end

This will run the migrations for your database.

Now, run the migration to create the table:

mix ecto.migrate

Link to this section Summary

Functions

Run the down changes for all migrations

Run the up changes for all migrations

Link to this section Functions

Run the down changes for all migrations

example

Example

Run all migrations down:

Literature.Migrations.down()

Run the up changes for all migrations

example

Example

Run all migrations up:

Literature.Migrations.up()