Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Activ8.DataFactory.insert(:profile, user: Activ8.ReadRepo.get(Activ8.User, 2))
- [debug] QUERY OK source="users" db=0.5ms queue=0.6ms idle=1138.1ms
- SELECT u0."id", u0."id_number", u0."id_type", u0."nationality", u0."first_name", u0."last_name", u0."other_names", u0."msisdn", u0."email", u0."dob", u0."gender", u0."password_hash", u0."status", u0."deleted", u0."confirmed_at", u0."reset_sent_at", u0."created_by_id", u0."inserted_at", u0."updated_at" FROM "users" AS u0 WHERE (u0."id" = $1) [2]
- [debug] QUERY OK db=0.3ms idle=1158.2ms
- begin []
- [debug] QUERY OK db=1.5ms
- INSERT INTO "profiles" ("user_id","inserted_at","updated_at") VALUES ($1,$2,$3) RETURNING "id" [2, ~N[2021-10-21 11:48:28], ~N[2021-10-21 11:48:28]]
- [debug] QUERY OK db=0.9ms
- commit []
- %Activ8.Profiles.Profile{
- __meta__: #Ecto.Schema.Metadata<:loaded, "profiles">,
- farm: #Ecto.Association.NotLoaded<association :farm is not loaded>,
- id: 9,
- inserted_at: ~N[2021-10-21 11:48:28],
- organisation: #Ecto.Association.NotLoaded<association :organisation is not loaded>,
- organisation_id: nil,
- profile_services: #Ecto.Association.NotLoaded<association :profile_services is not loaded>,
- roles: #Ecto.Association.NotLoaded<association :roles is not loaded>,
- routes: #Ecto.Association.NotLoaded<association :routes is not loaded>,
- updated_at: ~N[2021-10-21 11:48:28],
- user: %Activ8.User{
- __meta__: #Ecto.Schema.Metadata<:loaded, "users">,
- confirmed_at: nil,
- created_by: #Ecto.Association.NotLoaded<association :created_by is not loaded>,
- created_by_id: nil,
- deleted: false,
- dob: nil,
- email: nil,
- first_name: "Marvin",
- gender: nil,
- id: 2,
- id_number: "33461387",
- id_type: "passport",
- inserted_at: ~N[2021-10-21 10:23:03],
- last_name: "Kweyu",
- msisdn: "+254707127129",
- nationality: nil,
- other_names: nil,
- password: nil,
- password_confirmation: nil,
- password_hash: "$argon2id$v=19$m=131072,t=8,p=4$zXJZR8IFCrW0p4hUHYbEyg$WXRMFPMbSNtvqdBXBRW4Py8PktejEj2nfcnlVSUHU5c",
- reset_sent_at: nil,
- role_ids: nil,
- roles: #Ecto.Association.NotLoaded<association :roles is not loaded>,
- roles_ids: nil,
- sessions: #Ecto.Association.NotLoaded<association :sessions is not loaded>,
- status: "active",
- updated_at: ~N[2021-10-21 10:23:55],
- user_roles: #Ecto.Association.NotLoaded<association :user_roles is not loaded>
- },
- user_id: 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement