Fakultas Ilmu Komputer UI

seeds.exs 730 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 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:
#
#     Diskuy.Repo.insert!(%Diskuy.SomeSchema{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they will fail if something goes wrong.
alias Diskuy.Repo
alias Diskuy.Account.User
alias Diskuy.Forum.Topic
alias Diskuy.Forum.Thread


Muhammad Rafif Elfazri's avatar
Muhammad Rafif Elfazri committed
18
19
20
21
# Repo.insert!(%User{
#   username: "rafif",
#   email: "rafif@gmail.com"
# })
22
23
24
25
26

# Repo.insert!(%Topic{
#   name: "Gaming",
# })

27
28
29
30
31
32
# Repo.insert!(%Thread{
#   title: "Klee Gaming",
#   points: 0,
#   topic_id: "86284ef4-a22e-4c4b-8e46-212fa8a7a3f3",
#   user_id: "rafif@gmail.com"
# })