~robertgzr/greenfy

a760196d0386f80e8d7455541b9ac0becc46cb5b — Robert G├╝nzler 2 years ago d1cdcf8
test: seed database
1 files changed, 15 insertions(+), 0 deletions(-)

M priv/repo/seeds.exs
M priv/repo/seeds.exs => priv/repo/seeds.exs +15 -0
@@ 9,3 9,18 @@
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they will fail if something goes wrong.

alias Greenfy.Repo
alias Greenfy.Log

Repo.insert!(%Log.Event{
  event_type: "foo",
  message: "test message",
  payload: "test payload"
})

Repo.insert!(%Log.Event{
  event_type: "bar",
  message: "test message",
  payload: "test payload"
})