I want to create a seed module to run from my seed script in priv/repo/seeds.ex
The module is in priv/repo/seeds/app_seed.ex and is declared as following
defmodule App.EquipmentSeeder do alias App.Repo alias App.Equipment def add_equipment do IO.puts "Hello world" end def clear do IO.puts "delete" Repo.delete_all end end
and the script is just doing this
But when i run priv/repo/seeds.ex (or rather mix ecto.reset), i get
undefined (module App.EquipmentSeeder is not available)
It seems like this module is not built, how do I get around this?What is the problem? I have been sitting with this way to long.
Thankful for any help!