Guest User

Untitled

a guest
Nov 12th, 2017
485
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. user = SystemUser.new(email: "marcos@example.com", password: "marcos123")
  2. user.profile = Profile.new(first_name: "Marcos")
  3. user.save
  4.  
  5. (0.1ms) begin transaction
  6. SystemUser Exists (2.7ms) SELECT 1 AS one FROM "system_users" WHERE "system_users"."email" = ? LIMIT ? [["email", "marcos@example.com"], ["LIMIT", 1]]
  7. SQL (7.1ms) INSERT INTO "system_users" ("email", "encrypted_password", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["email", "marcos@example.com"], ["encrypted_password", "$2a$11$Wl8mzOtFlD9RRCdAr38Ze.vYdrbrPRHkIEqutAsAyodQSDzihy35O"], ["created_at", "2017-11-12 23:27:23.270956"], ["updated_at", "2017-11-12 23:27:23.270956"]]
  8. (0.1ms) begin transaction
  9. SQL (5188.0ms) INSERT INTO "profiles" ("first_name", "created_at", "updated_at", "system_user_id") VALUES (?, ?, ?, ?) [["first_name", "Marcos"], ["created_at", "2017-11-12 23:27:23.281227"], ["updated_at", "2017-11-12 23:27:23.281227"], ["system_user_id", 1]]
  10. (0.1ms) rollback transaction
  11. (6.2ms) rollback transaction
  12. ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: INSERT INTO "profiles" ("first_name", "created_at", "updated_at", "system_user_id") VALUES (?, ?, ?, ?)
  13. from (irb):3
Add Comment
Please, Sign In to add comment