phil_columns v2.0.0 PhilColumns.Seeder

Link to this section 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

Link to this section Functions

Link to this function 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.
Link to this function 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.

Link to this function seeds(repo, directory, opts)

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