19 lines
643 B
Elixir
19 lines
643 B
Elixir
# Script for populating the database. You can run it as:
|
|
#
|
|
# mix run priv/repo/seeds.exs
|
|
#
|
|
# Bootstrap runs in all environments. Dev seeds (members, groups, sample data)
|
|
# run only in dev and test.
|
|
|
|
Code.compiler_options(ignore_module_conflict: true)
|
|
|
|
# Always run bootstrap (fee types, custom fields, roles, admin, system user, settings)
|
|
Code.eval_file("priv/repo/seeds_bootstrap.exs")
|
|
|
|
# In dev and test only: run dev seeds (20 members, groups, custom field values)
|
|
if Mix.env() in [:dev, :test] do
|
|
Code.eval_file("priv/repo/seeds_dev.exs")
|
|
end
|
|
|
|
IO.puts("✅ All seeds completed.")
|
|
Code.compiler_options(ignore_module_conflict: false)
|