fp/services/bright/priv/repo/seeds.exs

18 lines
504 B
Elixir
Raw Normal View History

2025-01-03 14:45:35 +00:00
# Script for populating the database. You can run it as:
#
# mix run priv/repo/seeds.exs
#
# Inside the script, you can read and write to any of your
# repositories directly:
#
# Bright.Repo.insert!(%Bright.SomeSchema{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they will fail if something goes wrong.
for title <- ["Home Improvement", "Power Tools", "Gardening", "Books", "Education"] do
{:ok, _} = Bright.Catalog.create_category(%{title: title})
end