architex/priv/repo/seeds.exs

15 lines
275 B
Elixir

alias Architex.{Repo, Account}
account =
Repo.insert!(%Account{
localpart: "chuck",
password_hash: Bcrypt.hash_pwd_salt("sneed")
})
account
|> Ecto.build_assoc(:devices,
id: "android",
display_name: "My Android",
access_token: "sneed"
)
|> Repo.insert!()