ecto_immigrant

Data migrations for your ecto-backed elixir application.


Keywords
data-migration, ecto, elixir
License
Apache-2.0

Documentation

Ecto Immigrant

This package helps you to do data migrations in your ecto-backed elixir application.

It keeps track of which data migrations are run and stores this in the database, same as how ecto does schema migrations. In fact all the code for this has been borrowed from ecto and changed slightly to work for data migrations, all credit goes to the ecto team.

Three mix tasks are created by this package:

mix ecto_immigrant.gen.migration # Generates a new data migration for the repo
mix ecto_immigrant.migrate       # Runs the repository data migrations
mix ecto_immigrant.migrations    # Displays the repository data migration status

Data migrations are created in priv/repo/data_migrations dir.

Installation

If available in Hex, the package can be installed by adding ecto_immigrant to your list of dependencies in mix.exs:

def deps do
  [
    {:ecto_immigrant, "~> 0.3.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ecto_immigrant.