architex/priv/repo/seeds.exs

16 lines
275 B
Elixir
Raw Normal View History

2021-09-01 12:43:55 +00:00
alias Architex.{Repo, Account}
account =
Repo.insert!(%Account{
localpart: "chuck",
password_hash: Bcrypt.hash_pwd_salt("sneed")
})
account
|> Ecto.build_assoc(:devices,
2021-09-04 14:40:17 +00:00
id: "android",
display_name: "My Android",
access_token: "sneed"
)
|> Repo.insert!()