SeedHelper (Migration SeedHelper v0.1.0)

Summary

Functions

Begin a seeding session. This should be called in your priv/migrations/seed.exs file.

End a seeding session. This should be called in your priv/migrations/seed.exs file.

Get a handle to a value for use in seeds (like default_organization_id)

Macro to conditionally execute a block of code based on the current build environment

Queue block until all required seeds have been applied.

Execute block if seed has not been applied yet (and build env in options[:only] if set)

Set a handle to a value for reference by other seeds.

Functions

Link to this function

begin_session()

Begin a seeding session. This should be called in your priv/migrations/seed.exs file.

End a seeding session. This should be called in your priv/migrations/seed.exs file.

Link to this function

handle(handle, default \\ nil)

Get a handle to a value for use in seeds (like default_organization_id)

Link to this macro

if_env(env_or_envs, list)

(macro)

Macro to conditionally execute a block of code based on the current build environment

Link to this macro

requires_seed(seed_or_seeds, list)

(macro)

Queue block until all required seeds have been applied.

Link to this macro

seed(seed, options \\ [], list)

(macro)

Execute block if seed has not been applied yet (and build env in options[:only] if set)

Link to this function

set_handle(handle, value)

Set a handle to a value for reference by other seeds.