phil_columns v0.7.0 PhilColumns.Seeder

Summary

Functions

Apply seeds in a directory to a repository with given strategy

Gets all migrated versions

Returns an array of tuples as the seed status of the given repo, without actually running any seeds

Functions

run(repo, directory, direction, opts)
run(Ecto.Repo.t, binary, atom, Keyword.t) :: [integer]

Apply seeds in a directory to a repository with given strategy.

A strategy must be given as an option.

Options

  • :all - runs all available if true
  • :step - runs the specific number of seeds
  • :to - runs all until the supplied version is reached
  • :log - the level to use for logging. Defaults to :info. Can be any of Logger.level/0 values or false.
seeded_versions(repo)
seeded_versions(Ecto.Repo.t) :: [integer]

Gets all migrated versions.

This function ensures the migration table exists if no table has been defined yet.

seeds(repo, directory, opts)

Returns an array of tuples as the seed status of the given repo, without actually running any seeds.