invitational 1.4.2 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd7e854e7481cb8aef30e5dc8194cb0951385443401003a22567c14013227ce7
4
- data.tar.gz: d9c2ad136e409e3f7fbd1470804754e95ac0d5094447783a44d6b74efc2f2b66
3
+ metadata.gz: af388ccc20a3513b120fec55e474320a8b88c09cf053010469d88ba9873acfc0
4
+ data.tar.gz: d1e71d80069272487e609ef2bd31857e74a0481c44b5bd0e7406108987a46893
5
5
  SHA512:
6
- metadata.gz: 8e3389f67e31a3693fb36a22b21f4a70d535b278f8d53ed07abd2e2ed64d9908ac470cf313de45af962d0b9e299a5fce6aec7642383af34e9f29db8c01d995b2
7
- data.tar.gz: befc1f713715736d14b2f8aea97c2c93ba78fb51de666f306283e8ae574868ba3c8ab9863cc3f30b28b6aadd8562ab0e0967ace9f12315be295fb825ff81d859
6
+ metadata.gz: 733a15218e67582ce0be92bc31d01b70ec7c88ae9134faee5449fa4e234f196f07f27a47b8e92c4140fc6ec7d4f61ffd0310bd4d0a890696fbccff0162a3d1f4
7
+ data.tar.gz: 7d40414dd5f4c86e9b77793e17c403d47fc27d493095f9a7fdfd90682f72b9a7b6290cd347ccf6693bd0e23f087d2c92a4003a48907952dbf33e802b0c2f8c0a
@@ -1,3 +1,3 @@
1
1
  module Invitational
2
- VERSION = "1.4.2"
2
+ VERSION = "1.4.3"
3
3
  end
@@ -36258,3 +36258,1426 @@ Migrating to CreateInvitations (20130528220144)
36258
36258
   (0.0ms) RELEASE SAVEPOINT active_record_1
36259
36259
   (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
36260
36260
   (0.1ms) rollback transaction
36261
+  (0.6ms) SELECT sqlite_version(*)
36262
+  (0.0ms) SELECT sqlite_version(*)
36263
+  (0.0ms) DROP TABLE IF EXISTS "users"
36264
+  (1.7ms) CREATE TABLE "users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
36265
+  (0.1ms) DROP TABLE IF EXISTS "grandparents"
36266
+  (1.7ms) CREATE TABLE "grandparents" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
36267
+  (0.1ms) DROP TABLE IF EXISTS "entities"
36268
+  (1.7ms) CREATE TABLE "entities" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "grandparent_id" integer, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
36269
+  (0.1ms) DROP TABLE IF EXISTS "children"
36270
+  (1.6ms) CREATE TABLE "children" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "entity_id" integer, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
36271
+  (0.1ms) DROP TABLE IF EXISTS "other_entities"
36272
+  (1.9ms) CREATE TABLE "other_entities" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
36273
+  (0.1ms) DROP TABLE IF EXISTS "system_things"
36274
+  (1.6ms) CREATE TABLE "system_things" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
36275
+  (2.2ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
36276
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
36277
+  (0.0ms) begin transaction
36278
+ ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2020-10-07 15:23:20.497920"], ["updated_at", "2020-10-07 15:23:20.497920"]]
36279
+  (1.4ms) commit transaction
36280
+  (1.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
36281
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
36282
+ Migrating to CreateInvitations (20130528220144)
36283
+  (0.0ms) begin transaction
36284
+  (0.2ms) CREATE TABLE "invitations" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar, "role" varchar, "invitable_type" varchar, "invitable_id" integer, "user_id" integer, "date_sent" datetime, "date_accepted" datetime, "claim_hash" varchar, "created_at" datetime, "updated_at" datetime)
36285
+  (0.1ms) CREATE INDEX "index_invitations_on_invitable_id" ON "invitations" ("invitable_id")
36286
+  (0.1ms) CREATE INDEX "index_invitations_on_invitable_type" ON "invitations" ("invitable_type")
36287
+  (0.1ms) CREATE INDEX "index_invitations_on_user_id" ON "invitations" ("user_id")
36288
+ primary::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130528220144"]]
36289
+  (1.8ms) commit transaction
36290
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
36291
+  (0.1ms) SELECT sqlite_version(*)
36292
+  (0.0ms) begin transaction
36293
+  (0.0ms) SAVEPOINT active_record_1
36294
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:20.693866"], ["updated_at", "2020-10-07 15:23:20.693866"]]
36295
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36296
+  (0.0ms) SAVEPOINT active_record_1
36297
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.698110"], ["updated_at", "2020-10-07 15:23:20.698110"]]
36298
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36299
+  (0.1ms) SAVEPOINT active_record_1
36300
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:20.708717"], ["date_accepted", "2020-10-07 15:23:20.698852"], ["claim_hash", "98a7c11beacbd021848bcc9317efea4c1eb1c31b"], ["created_at", "2020-10-07 15:23:20.708676"], ["updated_at", "2020-10-07 15:23:20.708676"]]
36301
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36302
+  (0.0ms) SAVEPOINT active_record_1
36303
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:20.710154"], ["updated_at", "2020-10-07 15:23:20.710154"]]
36304
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36305
+  (0.0ms) SAVEPOINT active_record_1
36306
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 2"], ["created_at", "2020-10-07 15:23:20.711113"], ["updated_at", "2020-10-07 15:23:20.711113"]]
36307
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36308
+  (0.0ms) SAVEPOINT active_record_1
36309
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 2], ["user_id", 2], ["date_sent", "2020-10-07 15:23:20.712152"], ["date_accepted", "2020-10-07 15:23:20.711778"], ["claim_hash", "8c9507910339c98a6990a85615f102c6c02ce1ee"], ["created_at", "2020-10-07 15:23:20.712128"], ["updated_at", "2020-10-07 15:23:20.712128"]]
36310
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36311
+  (0.0ms) SAVEPOINT active_record_1
36312
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test5@d-i.co"], ["created_at", "2020-10-07 15:23:20.713154"], ["updated_at", "2020-10-07 15:23:20.713154"]]
36313
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36314
+  (0.1ms) SAVEPOINT active_record_1
36315
+ Grandparent Create (0.1ms) INSERT INTO "grandparents" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "A Grandparent"], ["created_at", "2020-10-07 15:23:20.720981"], ["updated_at", "2020-10-07 15:23:20.720981"]]
36316
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36317
+  (0.1ms) SAVEPOINT active_record_1
36318
+ Entity Update (0.1ms) UPDATE "entities" SET "grandparent_id" = ?, "updated_at" = ? WHERE "entities"."id" = ? [["grandparent_id", 1], ["updated_at", "2020-10-07 15:23:20.727157"], ["id", 2]]
36319
+  (0.1ms) RELEASE SAVEPOINT active_record_1
36320
+  (0.0ms) SAVEPOINT active_record_1
36321
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test5@d-i.co"], ["role", "admin"], ["invitable_type", "Grandparent"], ["invitable_id", 1], ["user_id", 3], ["date_sent", "2020-10-07 15:23:20.729270"], ["date_accepted", "2020-10-07 15:23:20.728774"], ["claim_hash", "b5fb12f54214ebf41513a26833758d1fe7ad2cc9"], ["created_at", "2020-10-07 15:23:20.729244"], ["updated_at", "2020-10-07 15:23:20.729244"]]
36322
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36323
+  (0.0ms) SAVEPOINT active_record_1
36324
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:20.730272"], ["updated_at", "2020-10-07 15:23:20.730272"]]
36325
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36326
+  (0.0ms) SAVEPOINT active_record_1
36327
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 4], ["date_sent", "2020-10-07 15:23:20.731099"], ["claim_hash", "e75953766e09a3fa0b2d55e5a929b47bd742c7af"], ["created_at", "2020-10-07 15:23:20.731077"], ["updated_at", "2020-10-07 15:23:20.731077"]]
36328
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36329
+  (0.0ms) SAVEPOINT active_record_1
36330
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test4@d-i.co"], ["created_at", "2020-10-07 15:23:20.731893"], ["updated_at", "2020-10-07 15:23:20.731893"]]
36331
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36332
+  (0.0ms) SAVEPOINT active_record_1
36333
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test4@d-i.co"], ["role", "employer"], ["user_id", 5], ["date_sent", "2020-10-07 15:23:20.732677"], ["claim_hash", "583bc166383852cecf53c525be7e9124c9c2e542"], ["created_at", "2020-10-07 15:23:20.732655"], ["updated_at", "2020-10-07 15:23:20.732655"]]
36334
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36335
+  (0.2ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
36336
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 1]]
36337
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) ORDER BY "invitations"."id" ASC LIMIT ? [["user_id", 1], ["LIMIT", 1]]
36338
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
36339
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 1]]
36340
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) ORDER BY "invitations"."id" ASC LIMIT ? [["user_id", 1], ["LIMIT", 1]]
36341
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
36342
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) [["user_id", 1]]
36343
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
36344
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) [["user_id", 1]]
36345
+  (0.1ms) rollback transaction
36346
+  (0.0ms) begin transaction
36347
+  (0.0ms) SAVEPOINT active_record_1
36348
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:20.743936"], ["updated_at", "2020-10-07 15:23:20.743936"]]
36349
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36350
+  (0.0ms) SAVEPOINT active_record_1
36351
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.744909"], ["updated_at", "2020-10-07 15:23:20.744909"]]
36352
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36353
+  (0.0ms) SAVEPOINT active_record_1
36354
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:20.745901"], ["date_accepted", "2020-10-07 15:23:20.745535"], ["claim_hash", "98a7c11beacbd021848bcc9317efea4c1eb1c31b"], ["created_at", "2020-10-07 15:23:20.745878"], ["updated_at", "2020-10-07 15:23:20.745878"]]
36355
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36356
+  (0.0ms) SAVEPOINT active_record_1
36357
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:20.746762"], ["updated_at", "2020-10-07 15:23:20.746762"]]
36358
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36359
+  (0.0ms) SAVEPOINT active_record_1
36360
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 2"], ["created_at", "2020-10-07 15:23:20.747506"], ["updated_at", "2020-10-07 15:23:20.747506"]]
36361
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36362
+  (0.0ms) SAVEPOINT active_record_1
36363
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 2], ["user_id", 2], ["date_sent", "2020-10-07 15:23:20.748404"], ["date_accepted", "2020-10-07 15:23:20.748084"], ["claim_hash", "8c9507910339c98a6990a85615f102c6c02ce1ee"], ["created_at", "2020-10-07 15:23:20.748381"], ["updated_at", "2020-10-07 15:23:20.748381"]]
36364
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36365
+  (0.0ms) SAVEPOINT active_record_1
36366
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test5@d-i.co"], ["created_at", "2020-10-07 15:23:20.749289"], ["updated_at", "2020-10-07 15:23:20.749289"]]
36367
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36368
+  (0.0ms) SAVEPOINT active_record_1
36369
+ Grandparent Create (0.1ms) INSERT INTO "grandparents" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "A Grandparent"], ["created_at", "2020-10-07 15:23:20.750109"], ["updated_at", "2020-10-07 15:23:20.750109"]]
36370
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36371
+  (0.1ms) SAVEPOINT active_record_1
36372
+ Entity Update (0.1ms) UPDATE "entities" SET "grandparent_id" = ?, "updated_at" = ? WHERE "entities"."id" = ? [["grandparent_id", 1], ["updated_at", "2020-10-07 15:23:20.751141"], ["id", 2]]
36373
+  (0.1ms) RELEASE SAVEPOINT active_record_1
36374
+  (0.1ms) SAVEPOINT active_record_1
36375
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test5@d-i.co"], ["role", "admin"], ["invitable_type", "Grandparent"], ["invitable_id", 1], ["user_id", 3], ["date_sent", "2020-10-07 15:23:20.752796"], ["date_accepted", "2020-10-07 15:23:20.752321"], ["claim_hash", "b5fb12f54214ebf41513a26833758d1fe7ad2cc9"], ["created_at", "2020-10-07 15:23:20.752768"], ["updated_at", "2020-10-07 15:23:20.752768"]]
36376
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36377
+  (0.0ms) SAVEPOINT active_record_1
36378
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:20.753981"], ["updated_at", "2020-10-07 15:23:20.753981"]]
36379
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36380
+  (0.0ms) SAVEPOINT active_record_1
36381
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 4], ["date_sent", "2020-10-07 15:23:20.754970"], ["claim_hash", "e75953766e09a3fa0b2d55e5a929b47bd742c7af"], ["created_at", "2020-10-07 15:23:20.754946"], ["updated_at", "2020-10-07 15:23:20.754946"]]
36382
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36383
+  (0.0ms) SAVEPOINT active_record_1
36384
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test4@d-i.co"], ["created_at", "2020-10-07 15:23:20.755910"], ["updated_at", "2020-10-07 15:23:20.755910"]]
36385
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36386
+  (0.0ms) SAVEPOINT active_record_1
36387
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test4@d-i.co"], ["role", "employer"], ["user_id", 5], ["date_sent", "2020-10-07 15:23:20.756833"], ["claim_hash", "583bc166383852cecf53c525be7e9124c9c2e542"], ["created_at", "2020-10-07 15:23:20.756807"], ["updated_at", "2020-10-07 15:23:20.756807"]]
36388
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36389
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 2]]
36390
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) [["user_id", 2]]
36391
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) ORDER BY "invitations"."id" ASC LIMIT ? [["user_id", 2], ["LIMIT", 1]]
36392
+  (0.2ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 2]]
36393
+  (0.2ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) [["user_id", 2]]
36394
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) ORDER BY "invitations"."id" ASC LIMIT ? [["user_id", 2], ["LIMIT", 1]]
36395
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 2]]
36396
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) [["user_id", 2]]
36397
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) ORDER BY "invitations"."id" ASC LIMIT ? [["user_id", 2], ["LIMIT", 1]]
36398
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 2]]
36399
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 2]]
36400
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 2]]
36401
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 2]]
36402
+  (0.1ms) rollback transaction
36403
+  (0.0ms) begin transaction
36404
+  (0.0ms) SAVEPOINT active_record_1
36405
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:20.766871"], ["updated_at", "2020-10-07 15:23:20.766871"]]
36406
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36407
+  (0.0ms) SAVEPOINT active_record_1
36408
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.767847"], ["updated_at", "2020-10-07 15:23:20.767847"]]
36409
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36410
+  (0.0ms) SAVEPOINT active_record_1
36411
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:20.768801"], ["date_accepted", "2020-10-07 15:23:20.768453"], ["claim_hash", "98a7c11beacbd021848bcc9317efea4c1eb1c31b"], ["created_at", "2020-10-07 15:23:20.768777"], ["updated_at", "2020-10-07 15:23:20.768777"]]
36412
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36413
+  (0.0ms) SAVEPOINT active_record_1
36414
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:20.769663"], ["updated_at", "2020-10-07 15:23:20.769663"]]
36415
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36416
+  (0.0ms) SAVEPOINT active_record_1
36417
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 2"], ["created_at", "2020-10-07 15:23:20.770354"], ["updated_at", "2020-10-07 15:23:20.770354"]]
36418
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36419
+  (0.0ms) SAVEPOINT active_record_1
36420
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 2], ["user_id", 2], ["date_sent", "2020-10-07 15:23:20.771213"], ["date_accepted", "2020-10-07 15:23:20.770911"], ["claim_hash", "8c9507910339c98a6990a85615f102c6c02ce1ee"], ["created_at", "2020-10-07 15:23:20.771193"], ["updated_at", "2020-10-07 15:23:20.771193"]]
36421
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36422
+  (0.0ms) SAVEPOINT active_record_1
36423
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test5@d-i.co"], ["created_at", "2020-10-07 15:23:20.772013"], ["updated_at", "2020-10-07 15:23:20.772013"]]
36424
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36425
+  (0.0ms) SAVEPOINT active_record_1
36426
+ Grandparent Create (0.1ms) INSERT INTO "grandparents" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "A Grandparent"], ["created_at", "2020-10-07 15:23:20.772729"], ["updated_at", "2020-10-07 15:23:20.772729"]]
36427
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36428
+  (0.0ms) SAVEPOINT active_record_1
36429
+ Entity Update (0.1ms) UPDATE "entities" SET "grandparent_id" = ?, "updated_at" = ? WHERE "entities"."id" = ? [["grandparent_id", 1], ["updated_at", "2020-10-07 15:23:20.773638"], ["id", 2]]
36430
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36431
+  (0.0ms) SAVEPOINT active_record_1
36432
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test5@d-i.co"], ["role", "admin"], ["invitable_type", "Grandparent"], ["invitable_id", 1], ["user_id", 3], ["date_sent", "2020-10-07 15:23:20.774556"], ["date_accepted", "2020-10-07 15:23:20.774231"], ["claim_hash", "b5fb12f54214ebf41513a26833758d1fe7ad2cc9"], ["created_at", "2020-10-07 15:23:20.774534"], ["updated_at", "2020-10-07 15:23:20.774534"]]
36433
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36434
+  (0.0ms) SAVEPOINT active_record_1
36435
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:20.775372"], ["updated_at", "2020-10-07 15:23:20.775372"]]
36436
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36437
+  (0.0ms) SAVEPOINT active_record_1
36438
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 4], ["date_sent", "2020-10-07 15:23:20.776149"], ["claim_hash", "e75953766e09a3fa0b2d55e5a929b47bd742c7af"], ["created_at", "2020-10-07 15:23:20.776128"], ["updated_at", "2020-10-07 15:23:20.776128"]]
36439
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36440
+  (0.0ms) SAVEPOINT active_record_1
36441
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test4@d-i.co"], ["created_at", "2020-10-07 15:23:20.776888"], ["updated_at", "2020-10-07 15:23:20.776888"]]
36442
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36443
+  (0.0ms) SAVEPOINT active_record_1
36444
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test4@d-i.co"], ["role", "employer"], ["user_id", 5], ["date_sent", "2020-10-07 15:23:20.777657"], ["claim_hash", "583bc166383852cecf53c525be7e9124c9c2e542"], ["created_at", "2020-10-07 15:23:20.777636"], ["updated_at", "2020-10-07 15:23:20.777636"]]
36445
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36446
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
36447
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 1]]
36448
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
36449
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) [["user_id", 1]]
36450
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
36451
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) [["user_id", 1]]
36452
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 2]]
36453
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) [["user_id", 2]]
36454
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 2]]
36455
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 2]]
36456
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 2]]
36457
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 2]]
36458
+  (0.1ms) rollback transaction
36459
+  (0.0ms) begin transaction
36460
+  (0.1ms) SAVEPOINT active_record_1
36461
+ User Create (0.2ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:20.784900"], ["updated_at", "2020-10-07 15:23:20.784900"]]
36462
+  (0.1ms) RELEASE SAVEPOINT active_record_1
36463
+  (0.1ms) SAVEPOINT active_record_1
36464
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.786432"], ["updated_at", "2020-10-07 15:23:20.786432"]]
36465
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36466
+  (0.1ms) SAVEPOINT active_record_1
36467
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:20.787847"], ["date_accepted", "2020-10-07 15:23:20.787377"], ["claim_hash", "98a7c11beacbd021848bcc9317efea4c1eb1c31b"], ["created_at", "2020-10-07 15:23:20.787819"], ["updated_at", "2020-10-07 15:23:20.787819"]]
36468
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36469
+  (0.0ms) SAVEPOINT active_record_1
36470
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:20.788965"], ["updated_at", "2020-10-07 15:23:20.788965"]]
36471
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36472
+  (0.0ms) SAVEPOINT active_record_1
36473
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 2"], ["created_at", "2020-10-07 15:23:20.789824"], ["updated_at", "2020-10-07 15:23:20.789824"]]
36474
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36475
+  (0.0ms) SAVEPOINT active_record_1
36476
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 2], ["user_id", 2], ["date_sent", "2020-10-07 15:23:20.790859"], ["date_accepted", "2020-10-07 15:23:20.790472"], ["claim_hash", "8c9507910339c98a6990a85615f102c6c02ce1ee"], ["created_at", "2020-10-07 15:23:20.790835"], ["updated_at", "2020-10-07 15:23:20.790835"]]
36477
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36478
+  (0.0ms) SAVEPOINT active_record_1
36479
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test5@d-i.co"], ["created_at", "2020-10-07 15:23:20.791858"], ["updated_at", "2020-10-07 15:23:20.791858"]]
36480
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36481
+  (0.0ms) SAVEPOINT active_record_1
36482
+ Grandparent Create (0.1ms) INSERT INTO "grandparents" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "A Grandparent"], ["created_at", "2020-10-07 15:23:20.792690"], ["updated_at", "2020-10-07 15:23:20.792690"]]
36483
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36484
+  (0.1ms) SAVEPOINT active_record_1
36485
+ Entity Update (0.2ms) UPDATE "entities" SET "grandparent_id" = ?, "updated_at" = ? WHERE "entities"."id" = ? [["grandparent_id", 1], ["updated_at", "2020-10-07 15:23:20.794166"], ["id", 2]]
36486
+  (0.1ms) RELEASE SAVEPOINT active_record_1
36487
+  (0.1ms) SAVEPOINT active_record_1
36488
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test5@d-i.co"], ["role", "admin"], ["invitable_type", "Grandparent"], ["invitable_id", 1], ["user_id", 3], ["date_sent", "2020-10-07 15:23:20.797808"], ["date_accepted", "2020-10-07 15:23:20.796318"], ["claim_hash", "b5fb12f54214ebf41513a26833758d1fe7ad2cc9"], ["created_at", "2020-10-07 15:23:20.797756"], ["updated_at", "2020-10-07 15:23:20.797756"]]
36489
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36490
+  (0.0ms) SAVEPOINT active_record_1
36491
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:20.798957"], ["updated_at", "2020-10-07 15:23:20.798957"]]
36492
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36493
+  (0.0ms) SAVEPOINT active_record_1
36494
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 4], ["date_sent", "2020-10-07 15:23:20.799796"], ["claim_hash", "e75953766e09a3fa0b2d55e5a929b47bd742c7af"], ["created_at", "2020-10-07 15:23:20.799771"], ["updated_at", "2020-10-07 15:23:20.799771"]]
36495
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36496
+  (0.0ms) SAVEPOINT active_record_1
36497
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test4@d-i.co"], ["created_at", "2020-10-07 15:23:20.800565"], ["updated_at", "2020-10-07 15:23:20.800565"]]
36498
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36499
+  (0.0ms) SAVEPOINT active_record_1
36500
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test4@d-i.co"], ["role", "employer"], ["user_id", 5], ["date_sent", "2020-10-07 15:23:20.801352"], ["claim_hash", "583bc166383852cecf53c525be7e9124c9c2e542"], ["created_at", "2020-10-07 15:23:20.801331"], ["updated_at", "2020-10-07 15:23:20.801331"]]
36501
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36502
+  (0.0ms) SAVEPOINT active_record_1
36503
+ SystemThing Create (0.1ms) INSERT INTO "system_things" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "A System Object"], ["created_at", "2020-10-07 15:23:20.805003"], ["updated_at", "2020-10-07 15:23:20.805003"]]
36504
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36505
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 5]]
36506
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'employer') [["user_id", 5]]
36507
+  (0.1ms) rollback transaction
36508
+  (0.0ms) begin transaction
36509
+  (0.0ms) SAVEPOINT active_record_1
36510
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:20.807694"], ["updated_at", "2020-10-07 15:23:20.807694"]]
36511
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36512
+  (0.0ms) SAVEPOINT active_record_1
36513
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.808597"], ["updated_at", "2020-10-07 15:23:20.808597"]]
36514
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36515
+  (0.0ms) SAVEPOINT active_record_1
36516
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:20.809560"], ["date_accepted", "2020-10-07 15:23:20.809199"], ["claim_hash", "98a7c11beacbd021848bcc9317efea4c1eb1c31b"], ["created_at", "2020-10-07 15:23:20.809537"], ["updated_at", "2020-10-07 15:23:20.809537"]]
36517
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36518
+  (0.0ms) SAVEPOINT active_record_1
36519
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:20.810389"], ["updated_at", "2020-10-07 15:23:20.810389"]]
36520
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36521
+  (0.0ms) SAVEPOINT active_record_1
36522
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 2"], ["created_at", "2020-10-07 15:23:20.811119"], ["updated_at", "2020-10-07 15:23:20.811119"]]
36523
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36524
+  (0.0ms) SAVEPOINT active_record_1
36525
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 2], ["user_id", 2], ["date_sent", "2020-10-07 15:23:20.812107"], ["date_accepted", "2020-10-07 15:23:20.811772"], ["claim_hash", "8c9507910339c98a6990a85615f102c6c02ce1ee"], ["created_at", "2020-10-07 15:23:20.812084"], ["updated_at", "2020-10-07 15:23:20.812084"]]
36526
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36527
+  (0.0ms) SAVEPOINT active_record_1
36528
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test5@d-i.co"], ["created_at", "2020-10-07 15:23:20.813014"], ["updated_at", "2020-10-07 15:23:20.813014"]]
36529
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36530
+  (0.0ms) SAVEPOINT active_record_1
36531
+ Grandparent Create (0.1ms) INSERT INTO "grandparents" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "A Grandparent"], ["created_at", "2020-10-07 15:23:20.813830"], ["updated_at", "2020-10-07 15:23:20.813830"]]
36532
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36533
+  (0.1ms) SAVEPOINT active_record_1
36534
+ Entity Update (0.1ms) UPDATE "entities" SET "grandparent_id" = ?, "updated_at" = ? WHERE "entities"."id" = ? [["grandparent_id", 1], ["updated_at", "2020-10-07 15:23:20.814945"], ["id", 2]]
36535
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36536
+  (0.1ms) SAVEPOINT active_record_1
36537
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test5@d-i.co"], ["role", "admin"], ["invitable_type", "Grandparent"], ["invitable_id", 1], ["user_id", 3], ["date_sent", "2020-10-07 15:23:20.816407"], ["date_accepted", "2020-10-07 15:23:20.815943"], ["claim_hash", "b5fb12f54214ebf41513a26833758d1fe7ad2cc9"], ["created_at", "2020-10-07 15:23:20.816381"], ["updated_at", "2020-10-07 15:23:20.816381"]]
36538
+  (0.1ms) RELEASE SAVEPOINT active_record_1
36539
+  (0.3ms) SAVEPOINT active_record_1
36540
+ User Create (0.3ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:20.818126"], ["updated_at", "2020-10-07 15:23:20.818126"]]
36541
+  (0.2ms) RELEASE SAVEPOINT active_record_1
36542
+  (0.1ms) SAVEPOINT active_record_1
36543
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 4], ["date_sent", "2020-10-07 15:23:20.822417"], ["claim_hash", "e75953766e09a3fa0b2d55e5a929b47bd742c7af"], ["created_at", "2020-10-07 15:23:20.822386"], ["updated_at", "2020-10-07 15:23:20.822386"]]
36544
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36545
+  (0.0ms) SAVEPOINT active_record_1
36546
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test4@d-i.co"], ["created_at", "2020-10-07 15:23:20.823454"], ["updated_at", "2020-10-07 15:23:20.823454"]]
36547
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36548
+  (0.0ms) SAVEPOINT active_record_1
36549
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test4@d-i.co"], ["role", "employer"], ["user_id", 5], ["date_sent", "2020-10-07 15:23:20.824273"], ["claim_hash", "583bc166383852cecf53c525be7e9124c9c2e542"], ["created_at", "2020-10-07 15:23:20.824250"], ["updated_at", "2020-10-07 15:23:20.824250"]]
36550
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36551
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 4]]
36552
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 4]]
36553
+  (0.0ms) SAVEPOINT active_record_1
36554
+ Child Create (0.1ms) INSERT INTO "children" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Child 1"], ["created_at", "2020-10-07 15:23:20.829630"], ["updated_at", "2020-10-07 15:23:20.829630"]]
36555
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36556
+  (0.0ms) SAVEPOINT active_record_1
36557
+ Child Update (0.1ms) UPDATE "children" SET "entity_id" = ?, "updated_at" = ? WHERE "children"."id" = ? [["entity_id", 2], ["updated_at", "2020-10-07 15:23:20.831132"], ["id", 1]]
36558
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36559
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 4]]
36560
+  (0.0ms) SAVEPOINT active_record_1
36561
+ OtherEntity Create (0.1ms) INSERT INTO "other_entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test other entity"], ["created_at", "2020-10-07 15:23:20.835117"], ["updated_at", "2020-10-07 15:23:20.835117"]]
36562
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36563
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 4]]
36564
+  (0.0ms) SAVEPOINT active_record_1
36565
+ SystemThing Create (0.1ms) INSERT INTO "system_things" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "A System Object"], ["created_at", "2020-10-07 15:23:20.836557"], ["updated_at", "2020-10-07 15:23:20.836557"]]
36566
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36567
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 4]]
36568
+  (0.1ms) rollback transaction
36569
+  (0.0ms) begin transaction
36570
+  (0.0ms) SAVEPOINT active_record_1
36571
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:20.838545"], ["updated_at", "2020-10-07 15:23:20.838545"]]
36572
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36573
+  (0.0ms) SAVEPOINT active_record_1
36574
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.839419"], ["updated_at", "2020-10-07 15:23:20.839419"]]
36575
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36576
+  (0.0ms) SAVEPOINT active_record_1
36577
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:20.840406"], ["date_accepted", "2020-10-07 15:23:20.840040"], ["claim_hash", "98a7c11beacbd021848bcc9317efea4c1eb1c31b"], ["created_at", "2020-10-07 15:23:20.840383"], ["updated_at", "2020-10-07 15:23:20.840383"]]
36578
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36579
+  (0.0ms) SAVEPOINT active_record_1
36580
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:20.841242"], ["updated_at", "2020-10-07 15:23:20.841242"]]
36581
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36582
+  (0.0ms) SAVEPOINT active_record_1
36583
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 2"], ["created_at", "2020-10-07 15:23:20.841966"], ["updated_at", "2020-10-07 15:23:20.841966"]]
36584
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36585
+  (0.0ms) SAVEPOINT active_record_1
36586
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 2], ["user_id", 2], ["date_sent", "2020-10-07 15:23:20.842875"], ["date_accepted", "2020-10-07 15:23:20.842547"], ["claim_hash", "8c9507910339c98a6990a85615f102c6c02ce1ee"], ["created_at", "2020-10-07 15:23:20.842851"], ["updated_at", "2020-10-07 15:23:20.842851"]]
36587
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36588
+  (0.0ms) SAVEPOINT active_record_1
36589
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test5@d-i.co"], ["created_at", "2020-10-07 15:23:20.843760"], ["updated_at", "2020-10-07 15:23:20.843760"]]
36590
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36591
+  (0.0ms) SAVEPOINT active_record_1
36592
+ Grandparent Create (0.1ms) INSERT INTO "grandparents" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "A Grandparent"], ["created_at", "2020-10-07 15:23:20.844507"], ["updated_at", "2020-10-07 15:23:20.844507"]]
36593
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36594
+  (0.0ms) SAVEPOINT active_record_1
36595
+ Entity Update (0.1ms) UPDATE "entities" SET "grandparent_id" = ?, "updated_at" = ? WHERE "entities"."id" = ? [["grandparent_id", 1], ["updated_at", "2020-10-07 15:23:20.845517"], ["id", 2]]
36596
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36597
+  (0.0ms) SAVEPOINT active_record_1
36598
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test5@d-i.co"], ["role", "admin"], ["invitable_type", "Grandparent"], ["invitable_id", 1], ["user_id", 3], ["date_sent", "2020-10-07 15:23:20.846593"], ["date_accepted", "2020-10-07 15:23:20.846174"], ["claim_hash", "b5fb12f54214ebf41513a26833758d1fe7ad2cc9"], ["created_at", "2020-10-07 15:23:20.846565"], ["updated_at", "2020-10-07 15:23:20.846565"]]
36599
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36600
+  (0.1ms) SAVEPOINT active_record_1
36601
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:20.847657"], ["updated_at", "2020-10-07 15:23:20.847657"]]
36602
+  (0.1ms) RELEASE SAVEPOINT active_record_1
36603
+  (0.0ms) SAVEPOINT active_record_1
36604
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 4], ["date_sent", "2020-10-07 15:23:20.849215"], ["claim_hash", "e75953766e09a3fa0b2d55e5a929b47bd742c7af"], ["created_at", "2020-10-07 15:23:20.849183"], ["updated_at", "2020-10-07 15:23:20.849183"]]
36605
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36606
+  (0.2ms) SAVEPOINT active_record_1
36607
+ User Create (0.5ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test4@d-i.co"], ["created_at", "2020-10-07 15:23:20.850307"], ["updated_at", "2020-10-07 15:23:20.850307"]]
36608
+  (0.2ms) RELEASE SAVEPOINT active_record_1
36609
+  (0.1ms) SAVEPOINT active_record_1
36610
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test4@d-i.co"], ["role", "employer"], ["user_id", 5], ["date_sent", "2020-10-07 15:23:20.854416"], ["claim_hash", "583bc166383852cecf53c525be7e9124c9c2e542"], ["created_at", "2020-10-07 15:23:20.854319"], ["updated_at", "2020-10-07 15:23:20.854319"]]
36611
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36612
+  (0.0ms) SAVEPOINT active_record_1
36613
+ OtherEntity Create (0.1ms) INSERT INTO "other_entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test other entity"], ["created_at", "2020-10-07 15:23:20.856071"], ["updated_at", "2020-10-07 15:23:20.856071"]]
36614
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36615
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 4]]
36616
+  (0.1ms) rollback transaction
36617
+  (0.0ms) begin transaction
36618
+  (0.0ms) SAVEPOINT active_record_1
36619
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:20.858435"], ["updated_at", "2020-10-07 15:23:20.858435"]]
36620
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36621
+  (0.0ms) SAVEPOINT active_record_1
36622
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.859313"], ["updated_at", "2020-10-07 15:23:20.859313"]]
36623
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36624
+  (0.0ms) SAVEPOINT active_record_1
36625
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:20.860253"], ["date_accepted", "2020-10-07 15:23:20.859911"], ["claim_hash", "98a7c11beacbd021848bcc9317efea4c1eb1c31b"], ["created_at", "2020-10-07 15:23:20.860231"], ["updated_at", "2020-10-07 15:23:20.860231"]]
36626
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36627
+  (0.0ms) SAVEPOINT active_record_1
36628
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:20.861101"], ["updated_at", "2020-10-07 15:23:20.861101"]]
36629
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36630
+  (0.0ms) SAVEPOINT active_record_1
36631
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 2"], ["created_at", "2020-10-07 15:23:20.861817"], ["updated_at", "2020-10-07 15:23:20.861817"]]
36632
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36633
+  (0.0ms) SAVEPOINT active_record_1
36634
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 2], ["user_id", 2], ["date_sent", "2020-10-07 15:23:20.862675"], ["date_accepted", "2020-10-07 15:23:20.862371"], ["claim_hash", "8c9507910339c98a6990a85615f102c6c02ce1ee"], ["created_at", "2020-10-07 15:23:20.862653"], ["updated_at", "2020-10-07 15:23:20.862653"]]
36635
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36636
+  (0.0ms) SAVEPOINT active_record_1
36637
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test5@d-i.co"], ["created_at", "2020-10-07 15:23:20.863494"], ["updated_at", "2020-10-07 15:23:20.863494"]]
36638
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36639
+  (0.0ms) SAVEPOINT active_record_1
36640
+ Grandparent Create (0.1ms) INSERT INTO "grandparents" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "A Grandparent"], ["created_at", "2020-10-07 15:23:20.864218"], ["updated_at", "2020-10-07 15:23:20.864218"]]
36641
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36642
+  (0.0ms) SAVEPOINT active_record_1
36643
+ Entity Update (0.1ms) UPDATE "entities" SET "grandparent_id" = ?, "updated_at" = ? WHERE "entities"."id" = ? [["grandparent_id", 1], ["updated_at", "2020-10-07 15:23:20.865112"], ["id", 2]]
36644
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36645
+  (0.0ms) SAVEPOINT active_record_1
36646
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test5@d-i.co"], ["role", "admin"], ["invitable_type", "Grandparent"], ["invitable_id", 1], ["user_id", 3], ["date_sent", "2020-10-07 15:23:20.866037"], ["date_accepted", "2020-10-07 15:23:20.865712"], ["claim_hash", "b5fb12f54214ebf41513a26833758d1fe7ad2cc9"], ["created_at", "2020-10-07 15:23:20.866013"], ["updated_at", "2020-10-07 15:23:20.866013"]]
36647
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36648
+  (0.0ms) SAVEPOINT active_record_1
36649
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:20.866902"], ["updated_at", "2020-10-07 15:23:20.866902"]]
36650
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36651
+  (0.0ms) SAVEPOINT active_record_1
36652
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 4], ["date_sent", "2020-10-07 15:23:20.867705"], ["claim_hash", "e75953766e09a3fa0b2d55e5a929b47bd742c7af"], ["created_at", "2020-10-07 15:23:20.867684"], ["updated_at", "2020-10-07 15:23:20.867684"]]
36653
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36654
+  (0.0ms) SAVEPOINT active_record_1
36655
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test4@d-i.co"], ["created_at", "2020-10-07 15:23:20.868456"], ["updated_at", "2020-10-07 15:23:20.868456"]]
36656
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36657
+  (0.0ms) SAVEPOINT active_record_1
36658
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test4@d-i.co"], ["role", "employer"], ["user_id", 5], ["date_sent", "2020-10-07 15:23:20.869215"], ["claim_hash", "583bc166383852cecf53c525be7e9124c9c2e542"], ["created_at", "2020-10-07 15:23:20.869194"], ["updated_at", "2020-10-07 15:23:20.869194"]]
36659
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36660
+  (0.0ms) SAVEPOINT active_record_1
36661
+ Child Create (0.1ms) INSERT INTO "children" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Child 1"], ["created_at", "2020-10-07 15:23:20.870149"], ["updated_at", "2020-10-07 15:23:20.870149"]]
36662
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36663
+  (0.0ms) SAVEPOINT active_record_1
36664
+ Child Update (0.1ms) UPDATE "children" SET "entity_id" = ?, "updated_at" = ? WHERE "children"."id" = ? [["entity_id", 2], ["updated_at", "2020-10-07 15:23:20.871005"], ["id", 1]]
36665
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36666
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 2]]
36667
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Child' AND invitable_id = 1) [["user_id", 2]]
36668
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 2]]
36669
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) [["user_id", 2]]
36670
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) ORDER BY "invitations"."id" ASC LIMIT ? [["user_id", 2], ["LIMIT", 1]]
36671
+  (0.1ms) rollback transaction
36672
+  (0.0ms) begin transaction
36673
+  (0.0ms) SAVEPOINT active_record_1
36674
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:20.874673"], ["updated_at", "2020-10-07 15:23:20.874673"]]
36675
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36676
+  (0.0ms) SAVEPOINT active_record_1
36677
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.875634"], ["updated_at", "2020-10-07 15:23:20.875634"]]
36678
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36679
+  (0.0ms) SAVEPOINT active_record_1
36680
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:20.876678"], ["date_accepted", "2020-10-07 15:23:20.876268"], ["claim_hash", "98a7c11beacbd021848bcc9317efea4c1eb1c31b"], ["created_at", "2020-10-07 15:23:20.876652"], ["updated_at", "2020-10-07 15:23:20.876652"]]
36681
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36682
+  (0.0ms) SAVEPOINT active_record_1
36683
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:20.877677"], ["updated_at", "2020-10-07 15:23:20.877677"]]
36684
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36685
+  (0.0ms) SAVEPOINT active_record_1
36686
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 2"], ["created_at", "2020-10-07 15:23:20.878576"], ["updated_at", "2020-10-07 15:23:20.878576"]]
36687
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36688
+  (0.0ms) SAVEPOINT active_record_1
36689
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 2], ["user_id", 2], ["date_sent", "2020-10-07 15:23:20.879690"], ["date_accepted", "2020-10-07 15:23:20.879265"], ["claim_hash", "8c9507910339c98a6990a85615f102c6c02ce1ee"], ["created_at", "2020-10-07 15:23:20.879662"], ["updated_at", "2020-10-07 15:23:20.879662"]]
36690
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36691
+  (0.0ms) SAVEPOINT active_record_1
36692
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test5@d-i.co"], ["created_at", "2020-10-07 15:23:20.880832"], ["updated_at", "2020-10-07 15:23:20.880832"]]
36693
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36694
+  (0.1ms) SAVEPOINT active_record_1
36695
+ Grandparent Create (0.1ms) INSERT INTO "grandparents" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "A Grandparent"], ["created_at", "2020-10-07 15:23:20.881892"], ["updated_at", "2020-10-07 15:23:20.881892"]]
36696
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36697
+  (0.2ms) SAVEPOINT active_record_1
36698
+ Entity Update (0.5ms) UPDATE "entities" SET "grandparent_id" = ?, "updated_at" = ? WHERE "entities"."id" = ? [["grandparent_id", 1], ["updated_at", "2020-10-07 15:23:20.883186"], ["id", 2]]
36699
+  (0.3ms) RELEASE SAVEPOINT active_record_1
36700
+  (0.1ms) SAVEPOINT active_record_1
36701
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test5@d-i.co"], ["role", "admin"], ["invitable_type", "Grandparent"], ["invitable_id", 1], ["user_id", 3], ["date_sent", "2020-10-07 15:23:20.887757"], ["date_accepted", "2020-10-07 15:23:20.886345"], ["claim_hash", "b5fb12f54214ebf41513a26833758d1fe7ad2cc9"], ["created_at", "2020-10-07 15:23:20.887674"], ["updated_at", "2020-10-07 15:23:20.887674"]]
36702
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36703
+  (0.0ms) SAVEPOINT active_record_1
36704
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:20.889266"], ["updated_at", "2020-10-07 15:23:20.889266"]]
36705
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36706
+  (0.0ms) SAVEPOINT active_record_1
36707
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 4], ["date_sent", "2020-10-07 15:23:20.890119"], ["claim_hash", "e75953766e09a3fa0b2d55e5a929b47bd742c7af"], ["created_at", "2020-10-07 15:23:20.890098"], ["updated_at", "2020-10-07 15:23:20.890098"]]
36708
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36709
+  (0.0ms) SAVEPOINT active_record_1
36710
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test4@d-i.co"], ["created_at", "2020-10-07 15:23:20.890904"], ["updated_at", "2020-10-07 15:23:20.890904"]]
36711
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36712
+  (0.0ms) SAVEPOINT active_record_1
36713
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test4@d-i.co"], ["role", "employer"], ["user_id", 5], ["date_sent", "2020-10-07 15:23:20.891718"], ["claim_hash", "583bc166383852cecf53c525be7e9124c9c2e542"], ["created_at", "2020-10-07 15:23:20.891697"], ["updated_at", "2020-10-07 15:23:20.891697"]]
36714
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36715
+  (0.0ms) SAVEPOINT active_record_1
36716
+ Child Create (0.1ms) INSERT INTO "children" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Child 1"], ["created_at", "2020-10-07 15:23:20.892636"], ["updated_at", "2020-10-07 15:23:20.892636"]]
36717
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36718
+  (0.0ms) SAVEPOINT active_record_1
36719
+ Child Update (0.1ms) UPDATE "children" SET "entity_id" = ?, "updated_at" = ? WHERE "children"."id" = ? [["entity_id", 2], ["updated_at", "2020-10-07 15:23:20.893487"], ["id", 1]]
36720
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36721
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 3]]
36722
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Child' AND invitable_id = 1) [["user_id", 3]]
36723
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 3]]
36724
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) [["user_id", 3]]
36725
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 3]]
36726
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) [["user_id", 3]]
36727
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 3]]
36728
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Grandparent' AND invitable_id = 1) [["user_id", 3]]
36729
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Grandparent' AND invitable_id = 1) ORDER BY "invitations"."id" ASC LIMIT ? [["user_id", 3], ["LIMIT", 1]]
36730
+  (0.1ms) rollback transaction
36731
+  (0.0ms) begin transaction
36732
+  (0.0ms) SAVEPOINT active_record_1
36733
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:20.898396"], ["updated_at", "2020-10-07 15:23:20.898396"]]
36734
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36735
+  (0.0ms) SAVEPOINT active_record_1
36736
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.899323"], ["updated_at", "2020-10-07 15:23:20.899323"]]
36737
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36738
+  (0.0ms) SAVEPOINT active_record_1
36739
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:20.900337"], ["date_accepted", "2020-10-07 15:23:20.899936"], ["claim_hash", "98a7c11beacbd021848bcc9317efea4c1eb1c31b"], ["created_at", "2020-10-07 15:23:20.900314"], ["updated_at", "2020-10-07 15:23:20.900314"]]
36740
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36741
+  (0.0ms) SAVEPOINT active_record_1
36742
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:20.901201"], ["updated_at", "2020-10-07 15:23:20.901201"]]
36743
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36744
+  (0.0ms) SAVEPOINT active_record_1
36745
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 2"], ["created_at", "2020-10-07 15:23:20.901911"], ["updated_at", "2020-10-07 15:23:20.901911"]]
36746
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36747
+  (0.0ms) SAVEPOINT active_record_1
36748
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 2], ["user_id", 2], ["date_sent", "2020-10-07 15:23:20.902791"], ["date_accepted", "2020-10-07 15:23:20.902477"], ["claim_hash", "8c9507910339c98a6990a85615f102c6c02ce1ee"], ["created_at", "2020-10-07 15:23:20.902770"], ["updated_at", "2020-10-07 15:23:20.902770"]]
36749
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36750
+  (0.0ms) SAVEPOINT active_record_1
36751
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test5@d-i.co"], ["created_at", "2020-10-07 15:23:20.903607"], ["updated_at", "2020-10-07 15:23:20.903607"]]
36752
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36753
+  (0.0ms) SAVEPOINT active_record_1
36754
+ Grandparent Create (0.1ms) INSERT INTO "grandparents" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "A Grandparent"], ["created_at", "2020-10-07 15:23:20.904317"], ["updated_at", "2020-10-07 15:23:20.904317"]]
36755
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36756
+  (0.0ms) SAVEPOINT active_record_1
36757
+ Entity Update (0.1ms) UPDATE "entities" SET "grandparent_id" = ?, "updated_at" = ? WHERE "entities"."id" = ? [["grandparent_id", 1], ["updated_at", "2020-10-07 15:23:20.905210"], ["id", 2]]
36758
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36759
+  (0.0ms) SAVEPOINT active_record_1
36760
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test5@d-i.co"], ["role", "admin"], ["invitable_type", "Grandparent"], ["invitable_id", 1], ["user_id", 3], ["date_sent", "2020-10-07 15:23:20.906199"], ["date_accepted", "2020-10-07 15:23:20.905855"], ["claim_hash", "b5fb12f54214ebf41513a26833758d1fe7ad2cc9"], ["created_at", "2020-10-07 15:23:20.906176"], ["updated_at", "2020-10-07 15:23:20.906176"]]
36761
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36762
+  (0.0ms) SAVEPOINT active_record_1
36763
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:20.907053"], ["updated_at", "2020-10-07 15:23:20.907053"]]
36764
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36765
+  (0.0ms) SAVEPOINT active_record_1
36766
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 4], ["date_sent", "2020-10-07 15:23:20.907949"], ["claim_hash", "e75953766e09a3fa0b2d55e5a929b47bd742c7af"], ["created_at", "2020-10-07 15:23:20.907926"], ["updated_at", "2020-10-07 15:23:20.907926"]]
36767
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36768
+  (0.0ms) SAVEPOINT active_record_1
36769
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test4@d-i.co"], ["created_at", "2020-10-07 15:23:20.908799"], ["updated_at", "2020-10-07 15:23:20.908799"]]
36770
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36771
+  (0.0ms) SAVEPOINT active_record_1
36772
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test4@d-i.co"], ["role", "employer"], ["user_id", 5], ["date_sent", "2020-10-07 15:23:20.909742"], ["claim_hash", "583bc166383852cecf53c525be7e9124c9c2e542"], ["created_at", "2020-10-07 15:23:20.909714"], ["updated_at", "2020-10-07 15:23:20.909714"]]
36773
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36774
+  (0.1ms) SAVEPOINT active_record_1
36775
+ Child Create (0.1ms) INSERT INTO "children" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Child 1"], ["created_at", "2020-10-07 15:23:20.910911"], ["updated_at", "2020-10-07 15:23:20.910911"]]
36776
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36777
+  (0.0ms) SAVEPOINT active_record_1
36778
+ Child Update (0.1ms) UPDATE "children" SET "entity_id" = ?, "updated_at" = ? WHERE "children"."id" = ? [["entity_id", 2], ["updated_at", "2020-10-07 15:23:20.912148"], ["id", 1]]
36779
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36780
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
36781
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Child' AND invitable_id = 1) [["user_id", 1]]
36782
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
36783
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) [["user_id", 1]]
36784
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
36785
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) [["user_id", 1]]
36786
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
36787
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Grandparent' AND invitable_id = 1) [["user_id", 1]]
36788
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
36789
+  (0.3ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Child' AND invitable_id = 1) [["user_id", 1]]
36790
+  (0.3ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
36791
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) [["user_id", 1]]
36792
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
36793
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 2) [["user_id", 1]]
36794
+  (1.3ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
36795
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Grandparent' AND invitable_id = 1) [["user_id", 1]]
36796
+  (0.1ms) rollback transaction
36797
+  (0.0ms) begin transaction
36798
+ Invitation Load (0.3ms) SELECT "invitations".* FROM "invitations"
36799
+  (0.0ms) SAVEPOINT active_record_1
36800
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:20.934196"], ["updated_at", "2020-10-07 15:23:20.934196"]]
36801
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36802
+  (0.0ms) SAVEPOINT active_record_1
36803
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.935143"], ["updated_at", "2020-10-07 15:23:20.935143"]]
36804
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36805
+  (0.0ms) SAVEPOINT active_record_1
36806
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:20.936117"], ["date_accepted", "2020-10-07 15:23:20.935757"], ["claim_hash", "98a7c11beacbd021848bcc9317efea4c1eb1c31b"], ["created_at", "2020-10-07 15:23:20.936092"], ["updated_at", "2020-10-07 15:23:20.936092"]]
36807
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36808
+ User Exists? (0.2ms) SELECT 1 AS one FROM "users" INNER JOIN "invitations" ON "users"."id" = "invitations"."user_id" WHERE "invitations"."invitable_id" = ? AND "invitations"."invitable_type" = ? AND (invitations.role = 'admin') AND "users"."id" = ? LIMIT ? [["invitable_id", 1], ["invitable_type", "Entity"], ["id", 1], ["LIMIT", 1]]
36809
+  (0.1ms) rollback transaction
36810
+  (0.0ms) begin transaction
36811
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
36812
+  (0.0ms) SAVEPOINT active_record_1
36813
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.943657"], ["updated_at", "2020-10-07 15:23:20.943657"]]
36814
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36815
+  (0.0ms) SAVEPOINT active_record_1
36816
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:20.944705"], ["updated_at", "2020-10-07 15:23:20.944705"]]
36817
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36818
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 1]]
36819
+  (0.1ms) SAVEPOINT active_record_1
36820
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:20.946461"], ["date_accepted", "2020-10-07 15:23:20.946212"], ["claim_hash", "98a7c11beacbd021848bcc9317efea4c1eb1c31b"], ["created_at", "2020-10-07 15:23:20.946432"], ["updated_at", "2020-10-07 15:23:20.946432"]]
36821
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36822
+  (0.1ms) rollback transaction
36823
+  (0.1ms) begin transaction
36824
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
36825
+  (0.2ms) SAVEPOINT active_record_1
36826
+ User Create (0.5ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:20.949573"], ["updated_at", "2020-10-07 15:23:20.949573"]]
36827
+  (0.2ms) RELEASE SAVEPOINT active_record_1
36828
+  (0.1ms) SAVEPOINT active_record_1
36829
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.953034"], ["updated_at", "2020-10-07 15:23:20.953034"]]
36830
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36831
+  (0.0ms) SAVEPOINT active_record_1
36832
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:20.954278"], ["date_accepted", "2020-10-07 15:23:20.953891"], ["claim_hash", "98a7c11beacbd021848bcc9317efea4c1eb1c31b"], ["created_at", "2020-10-07 15:23:20.954253"], ["updated_at", "2020-10-07 15:23:20.954253"]]
36833
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36834
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 1]]
36835
+  (0.1ms) rollback transaction
36836
+  (0.0ms) begin transaction
36837
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
36838
+  (0.0ms) SAVEPOINT active_record_1
36839
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.956850"], ["updated_at", "2020-10-07 15:23:20.956850"]]
36840
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36841
+  (0.0ms) SAVEPOINT active_record_1
36842
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:20.957764"], ["updated_at", "2020-10-07 15:23:20.957764"]]
36843
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36844
+  (0.1ms) rollback transaction
36845
+  (0.0ms) begin transaction
36846
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
36847
+  (0.0ms) SAVEPOINT active_record_1
36848
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:20.959570"], ["updated_at", "2020-10-07 15:23:20.959570"]]
36849
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36850
+  (0.0ms) SAVEPOINT active_record_1
36851
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.960368"], ["updated_at", "2020-10-07 15:23:20.960368"]]
36852
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36853
+  (0.0ms) SAVEPOINT active_record_1
36854
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:20.961326"], ["date_accepted", "2020-10-07 15:23:20.960977"], ["claim_hash", "98a7c11beacbd021848bcc9317efea4c1eb1c31b"], ["created_at", "2020-10-07 15:23:20.961303"], ["updated_at", "2020-10-07 15:23:20.961303"]]
36855
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36856
+  (0.0ms) SAVEPOINT active_record_1
36857
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."invitable_id" = ? AND "invitations"."invitable_type" = ? [["invitable_id", 1], ["invitable_type", "Entity"]]
36858
+ Invitation Destroy (0.1ms) DELETE FROM "invitations" WHERE "invitations"."id" = ? [["id", 1]]
36859
+ Entity Destroy (0.1ms) DELETE FROM "entities" WHERE "entities"."id" = ? [["id", 1]]
36860
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36861
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
36862
+  (0.1ms) rollback transaction
36863
+  (0.0ms) begin transaction
36864
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
36865
+  (0.0ms) SAVEPOINT active_record_1
36866
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.965153"], ["updated_at", "2020-10-07 15:23:20.965153"]]
36867
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36868
+  (0.0ms) SAVEPOINT active_record_1
36869
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["email", "test999@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["date_sent", "2020-10-07 15:23:20.966114"], ["claim_hash", "b07adaf47ae46b41d88eb74846aaf7d13b357b50"], ["created_at", "2020-10-07 15:23:20.966089"], ["updated_at", "2020-10-07 15:23:20.966089"]]
36870
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36871
+  (0.1ms) rollback transaction
36872
+  (0.0ms) begin transaction
36873
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
36874
+  (0.0ms) SAVEPOINT active_record_1
36875
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:20.968109"], ["updated_at", "2020-10-07 15:23:20.968109"]]
36876
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36877
+  (0.0ms) SAVEPOINT active_record_1
36878
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.968982"], ["updated_at", "2020-10-07 15:23:20.968982"]]
36879
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36880
+  (0.0ms) SAVEPOINT active_record_1
36881
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["date_sent", "2020-10-07 15:23:20.969875"], ["claim_hash", "98a7c11beacbd021848bcc9317efea4c1eb1c31b"], ["created_at", "2020-10-07 15:23:20.969843"], ["updated_at", "2020-10-07 15:23:20.969843"]]
36882
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36883
+  (0.1ms) rollback transaction
36884
+  (0.0ms) begin transaction
36885
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
36886
+  (0.0ms) SAVEPOINT active_record_1
36887
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:20.971894"], ["updated_at", "2020-10-07 15:23:20.971894"]]
36888
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36889
+  (0.0ms) SAVEPOINT active_record_1
36890
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 1], ["date_sent", "2020-10-07 15:23:20.973044"], ["claim_hash", "e75953766e09a3fa0b2d55e5a929b47bd742c7af"], ["created_at", "2020-10-07 15:23:20.973018"], ["updated_at", "2020-10-07 15:23:20.973018"]]
36891
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36892
+  (0.1ms) rollback transaction
36893
+  (0.0ms) begin transaction
36894
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
36895
+  (0.0ms) SAVEPOINT active_record_1
36896
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:20.975602"], ["updated_at", "2020-10-07 15:23:20.975602"]]
36897
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36898
+  (0.0ms) SAVEPOINT active_record_1
36899
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.976630"], ["updated_at", "2020-10-07 15:23:20.976630"]]
36900
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36901
+  (0.0ms) SAVEPOINT active_record_1
36902
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["date_sent", "2020-10-07 15:23:20.977642"], ["claim_hash", "98a7c11beacbd021848bcc9317efea4c1eb1c31b"], ["created_at", "2020-10-07 15:23:20.977617"], ["updated_at", "2020-10-07 15:23:20.977617"]]
36903
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36904
+  (0.0ms) SAVEPOINT active_record_1
36905
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:20.978624"], ["updated_at", "2020-10-07 15:23:20.978624"]]
36906
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36907
+  (0.0ms) SAVEPOINT active_record_1
36908
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 2"], ["created_at", "2020-10-07 15:23:20.979488"], ["updated_at", "2020-10-07 15:23:20.979488"]]
36909
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36910
+  (0.1ms) SAVEPOINT active_record_1
36911
+ Invitation Create (0.2ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 2], ["user_id", 2], ["date_sent", "2020-10-07 15:23:20.980694"], ["date_accepted", "2020-10-07 15:23:20.980168"], ["claim_hash", "8c9507910339c98a6990a85615f102c6c02ce1ee"], ["created_at", "2020-10-07 15:23:20.980655"], ["updated_at", "2020-10-07 15:23:20.980655"]]
36912
+  (0.1ms) RELEASE SAVEPOINT active_record_1
36913
+  (0.2ms) rollback transaction
36914
+  (0.0ms) begin transaction
36915
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
36916
+  (0.1ms) SAVEPOINT active_record_1
36917
+ User Create (0.2ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:20.984076"], ["updated_at", "2020-10-07 15:23:20.984076"]]
36918
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36919
+  (0.1ms) SAVEPOINT active_record_1
36920
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 1], ["date_sent", "2020-10-07 15:23:20.985580"], ["claim_hash", "e75953766e09a3fa0b2d55e5a929b47bd742c7af"], ["created_at", "2020-10-07 15:23:20.985546"], ["updated_at", "2020-10-07 15:23:20.985546"]]
36921
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36922
+  (0.1ms) rollback transaction
36923
+  (0.0ms) begin transaction
36924
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
36925
+  (0.0ms) SAVEPOINT active_record_1
36926
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:20.987993"], ["updated_at", "2020-10-07 15:23:20.987993"]]
36927
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36928
+  (0.0ms) SAVEPOINT active_record_1
36929
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.988902"], ["updated_at", "2020-10-07 15:23:20.988902"]]
36930
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36931
+  (0.0ms) SAVEPOINT active_record_1
36932
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["date_sent", "2020-10-07 15:23:20.989763"], ["claim_hash", "98a7c11beacbd021848bcc9317efea4c1eb1c31b"], ["created_at", "2020-10-07 15:23:20.989740"], ["updated_at", "2020-10-07 15:23:20.989740"]]
36933
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36934
+  (0.1ms) rollback transaction
36935
+  (0.0ms) begin transaction
36936
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
36937
+  (0.0ms) SAVEPOINT active_record_1
36938
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:20.991572"], ["updated_at", "2020-10-07 15:23:20.991572"]]
36939
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36940
+  (0.0ms) SAVEPOINT active_record_1
36941
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 2"], ["created_at", "2020-10-07 15:23:20.992400"], ["updated_at", "2020-10-07 15:23:20.992400"]]
36942
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36943
+  (0.0ms) SAVEPOINT active_record_1
36944
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:20.993304"], ["date_accepted", "2020-10-07 15:23:20.992974"], ["claim_hash", "8c9507910339c98a6990a85615f102c6c02ce1ee"], ["created_at", "2020-10-07 15:23:20.993282"], ["updated_at", "2020-10-07 15:23:20.993282"]]
36945
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36946
+  (0.1ms) rollback transaction
36947
+  (0.0ms) begin transaction
36948
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
36949
+  (0.1ms) SAVEPOINT active_record_1
36950
+ User Create (0.2ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:20.995323"], ["updated_at", "2020-10-07 15:23:20.995323"]]
36951
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36952
+  (0.1ms) SAVEPOINT active_record_1
36953
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:20.996596"], ["updated_at", "2020-10-07 15:23:20.996596"]]
36954
+  (0.1ms) RELEASE SAVEPOINT active_record_1
36955
+  (0.1ms) SAVEPOINT active_record_1
36956
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["date_sent", "2020-10-07 15:23:20.998027"], ["claim_hash", "98a7c11beacbd021848bcc9317efea4c1eb1c31b"], ["created_at", "2020-10-07 15:23:20.997989"], ["updated_at", "2020-10-07 15:23:20.997989"]]
36957
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36958
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE (claim_hash = '98a7c11beacbd021848bcc9317efea4c1eb1c31b') ORDER BY "invitations"."id" ASC LIMIT ? [["LIMIT", 1]]
36959
+  (0.1ms) SAVEPOINT active_record_1
36960
+ Entity Load (0.1ms) SELECT "entities".* FROM "entities" WHERE "entities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
36961
+ Invitation Update (0.1ms) UPDATE "invitations" SET "date_accepted" = ?, "user_id" = ?, "updated_at" = ? WHERE "invitations"."id" = ? [["date_accepted", "2020-10-07 15:23:20.999830"], ["user_id", 1], ["updated_at", "2020-10-07 15:23:21.001492"], ["id", 1]]
36962
+  (0.1ms) RELEASE SAVEPOINT active_record_1
36963
+ Invitation Exists? (0.1ms) SELECT 1 AS one FROM "invitations" WHERE "invitations"."user_id" = ? AND "invitations"."id" = ? LIMIT ? [["user_id", 1], ["id", 1], ["LIMIT", 1]]
36964
+  (0.1ms) rollback transaction
36965
+  (0.1ms) begin transaction
36966
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
36967
+  (0.1ms) SAVEPOINT active_record_1
36968
+ User Create (0.2ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test4@d-i.co"], ["created_at", "2020-10-07 15:23:21.005650"], ["updated_at", "2020-10-07 15:23:21.005650"]]
36969
+  (0.1ms) RELEASE SAVEPOINT active_record_1
36970
+  (0.1ms) SAVEPOINT active_record_1
36971
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 3"], ["created_at", "2020-10-07 15:23:21.007157"], ["updated_at", "2020-10-07 15:23:21.007157"]]
36972
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36973
+  (0.0ms) SAVEPOINT active_record_1
36974
+ Invitation Create (0.2ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["email", "test4@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["date_sent", "2020-10-07 15:23:21.008440"], ["claim_hash", "0cbcebe4b11af60357e9903f19965592966db66f"], ["created_at", "2020-10-07 15:23:21.008412"], ["updated_at", "2020-10-07 15:23:21.008412"]]
36975
+  (0.1ms) RELEASE SAVEPOINT active_record_1
36976
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE (email = 'test4@d-i.co' AND user_id IS NULL)
36977
+  (0.0ms) SAVEPOINT active_record_1
36978
+ Entity Load (0.0ms) SELECT "entities".* FROM "entities" WHERE "entities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
36979
+ Invitation Update (0.1ms) UPDATE "invitations" SET "user_id" = ?, "date_accepted" = ?, "updated_at" = ? WHERE "invitations"."id" = ? [["user_id", 1], ["date_accepted", "2020-10-07 15:23:21.010008"], ["updated_at", "2020-10-07 15:23:21.010883"], ["id", 1]]
36980
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36981
+ Entity Exists? (0.1ms) SELECT 1 AS one FROM "entities" INNER JOIN "invitations" ON "entities"."id" = "invitations"."invitable_id" WHERE "invitations"."user_id" = ? AND "invitations"."invitable_type" = ? AND "entities"."id" = ? LIMIT ? [["user_id", 1], ["invitable_type", "Entity"], ["id", 1], ["LIMIT", 1]]
36982
+  (0.1ms) rollback transaction
36983
+  (0.0ms) begin transaction
36984
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
36985
+  (0.1ms) SAVEPOINT active_record_1
36986
+ User Create (0.2ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test4@d-i.co"], ["created_at", "2020-10-07 15:23:21.014406"], ["updated_at", "2020-10-07 15:23:21.014406"]]
36987
+  (0.1ms) RELEASE SAVEPOINT active_record_1
36988
+  (0.2ms) SELECT COUNT(*) FROM "invitations" WHERE (invitable_id IS NULL AND role = 'uberadmin') AND (email = 'test4@d-i.co')
36989
+  (0.0ms) SAVEPOINT active_record_1
36990
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test4@d-i.co"], ["role", "uberadmin"], ["date_sent", "2020-10-07 15:23:21.016978"], ["claim_hash", "0cbcebe4b11af60357e9903f19965592966db66f"], ["created_at", "2020-10-07 15:23:21.016947"], ["updated_at", "2020-10-07 15:23:21.016947"]]
36991
+  (0.1ms) RELEASE SAVEPOINT active_record_1
36992
+  (0.1ms) rollback transaction
36993
+  (0.1ms) begin transaction
36994
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
36995
+  (0.1ms) SAVEPOINT active_record_1
36996
+ User Create (0.2ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test4@d-i.co"], ["created_at", "2020-10-07 15:23:21.019771"], ["updated_at", "2020-10-07 15:23:21.019771"]]
36997
+  (0.1ms) RELEASE SAVEPOINT active_record_1
36998
+  (0.2ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
36999
+  (0.0ms) SAVEPOINT active_record_1
37000
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["email", "test4@d-i.co"], ["role", "uberadmin"], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.022448"], ["date_accepted", "2020-10-07 15:23:21.022188"], ["claim_hash", "0cbcebe4b11af60357e9903f19965592966db66f"], ["created_at", "2020-10-07 15:23:21.022411"], ["updated_at", "2020-10-07 15:23:21.022411"]]
37001
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37002
+  (0.1ms) rollback transaction
37003
+  (0.0ms) begin transaction
37004
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37005
+  (0.0ms) SAVEPOINT active_record_1
37006
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test4@d-i.co"], ["created_at", "2020-10-07 15:23:21.024684"], ["updated_at", "2020-10-07 15:23:21.024684"]]
37007
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37008
+  (0.0ms) SAVEPOINT active_record_1
37009
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test4@d-i.co"], ["role", "uberadmin"], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.025630"], ["claim_hash", "0cbcebe4b11af60357e9903f19965592966db66f"], ["created_at", "2020-10-07 15:23:21.025607"], ["updated_at", "2020-10-07 15:23:21.025607"]]
37010
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37011
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
37012
+  (0.1ms) rollback transaction
37013
+  (0.0ms) begin transaction
37014
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37015
+  (0.0ms) SAVEPOINT active_record_1
37016
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test4@d-i.co"], ["created_at", "2020-10-07 15:23:21.028015"], ["updated_at", "2020-10-07 15:23:21.028015"]]
37017
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37018
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE (invitable_id IS NULL AND role = 'employer') AND (email = 'test4@d-i.co')
37019
+  (0.0ms) SAVEPOINT active_record_1
37020
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test4@d-i.co"], ["role", "employer"], ["date_sent", "2020-10-07 15:23:21.029259"], ["claim_hash", "0cbcebe4b11af60357e9903f19965592966db66f"], ["created_at", "2020-10-07 15:23:21.029236"], ["updated_at", "2020-10-07 15:23:21.029236"]]
37021
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37022
+  (0.1ms) rollback transaction
37023
+  (0.0ms) begin transaction
37024
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37025
+  (0.0ms) SAVEPOINT active_record_1
37026
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test4@d-i.co"], ["created_at", "2020-10-07 15:23:21.031285"], ["updated_at", "2020-10-07 15:23:21.031285"]]
37027
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37028
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'employer') [["user_id", 1]]
37029
+  (0.0ms) SAVEPOINT active_record_1
37030
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["email", "test4@d-i.co"], ["role", "employer"], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.032937"], ["date_accepted", "2020-10-07 15:23:21.032736"], ["claim_hash", "0cbcebe4b11af60357e9903f19965592966db66f"], ["created_at", "2020-10-07 15:23:21.032912"], ["updated_at", "2020-10-07 15:23:21.032912"]]
37031
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37032
+  (0.1ms) rollback transaction
37033
+  (0.0ms) begin transaction
37034
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
37035
+  (0.1ms) SAVEPOINT active_record_1
37036
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test4@d-i.co"], ["created_at", "2020-10-07 15:23:21.035340"], ["updated_at", "2020-10-07 15:23:21.035340"]]
37037
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37038
+  (0.1ms) SAVEPOINT active_record_1
37039
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test4@d-i.co"], ["role", "employer"], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.036669"], ["claim_hash", "0cbcebe4b11af60357e9903f19965592966db66f"], ["created_at", "2020-10-07 15:23:21.036637"], ["updated_at", "2020-10-07 15:23:21.036637"]]
37040
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37041
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'employer') [["user_id", 1]]
37042
+  (0.1ms) rollback transaction
37043
+  (0.1ms) begin transaction
37044
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
37045
+  (0.0ms) SAVEPOINT active_record_1
37046
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.040064"], ["updated_at", "2020-10-07 15:23:21.040064"]]
37047
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37048
+  (0.0ms) SAVEPOINT active_record_1
37049
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:21.041138"], ["updated_at", "2020-10-07 15:23:21.041138"]]
37050
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37051
+  (0.1ms) SAVEPOINT active_record_1
37052
+ Invitation Create (0.2ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.042410"], ["date_accepted", "2020-10-07 15:23:21.041873"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.042376"], ["updated_at", "2020-10-07 15:23:21.042376"]]
37053
+  (0.1ms) RELEASE SAVEPOINT active_record_1
37054
+ Entity Exists? (0.2ms) SELECT 1 AS one FROM "entities" INNER JOIN "invitations" ON "entities"."id" = "invitations"."invitable_id" WHERE "invitations"."user_id" = ? AND "invitations"."invitable_type" = ? AND "entities"."id" = ? LIMIT ? [["user_id", 1], ["invitable_type", "Entity"], ["id", 1], ["LIMIT", 1]]
37055
+  (0.2ms) SELECT COUNT(*) FROM "children" INNER JOIN "invitations" ON "children"."id" = "invitations"."invitable_id" WHERE "invitations"."user_id" = ? AND "invitations"."invitable_type" = ? [["user_id", 1], ["invitable_type", "Child"]]
37056
+  (0.1ms) rollback transaction
37057
+  (0.1ms) begin transaction
37058
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
37059
+  (0.0ms) SAVEPOINT active_record_1
37060
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:21.048653"], ["updated_at", "2020-10-07 15:23:21.048653"]]
37061
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37062
+  (0.0ms) SAVEPOINT active_record_1
37063
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "uberadmin"], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.049723"], ["claim_hash", "33e4c701d9603515b68067c3f1b42e63adaa0f1a"], ["created_at", "2020-10-07 15:23:21.049695"], ["updated_at", "2020-10-07 15:23:21.049695"]]
37064
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37065
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
37066
+  (0.1ms) rollback transaction
37067
+  (0.0ms) begin transaction
37068
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37069
+  (0.0ms) SAVEPOINT active_record_1
37070
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.052208"], ["updated_at", "2020-10-07 15:23:21.052208"]]
37071
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37072
+  (0.0ms) SAVEPOINT active_record_1
37073
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:21.053058"], ["updated_at", "2020-10-07 15:23:21.053058"]]
37074
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37075
+  (0.0ms) SAVEPOINT active_record_1
37076
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.053972"], ["date_accepted", "2020-10-07 15:23:21.053635"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.053944"], ["updated_at", "2020-10-07 15:23:21.053944"]]
37077
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37078
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
37079
+  (0.1ms) rollback transaction
37080
+  (0.0ms) begin transaction
37081
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37082
+  (0.0ms) SAVEPOINT active_record_1
37083
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:21.056261"], ["updated_at", "2020-10-07 15:23:21.056261"]]
37084
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37085
+  (0.0ms) SAVEPOINT active_record_1
37086
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "employer"], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.057224"], ["claim_hash", "33e4c701d9603515b68067c3f1b42e63adaa0f1a"], ["created_at", "2020-10-07 15:23:21.057189"], ["updated_at", "2020-10-07 15:23:21.057189"]]
37087
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37088
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'employer') [["user_id", 1]]
37089
+  (0.1ms) rollback transaction
37090
+  (0.0ms) begin transaction
37091
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37092
+  (0.0ms) SAVEPOINT active_record_1
37093
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.059501"], ["updated_at", "2020-10-07 15:23:21.059501"]]
37094
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37095
+  (0.0ms) SAVEPOINT active_record_1
37096
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:21.060338"], ["updated_at", "2020-10-07 15:23:21.060338"]]
37097
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37098
+  (0.0ms) SAVEPOINT active_record_1
37099
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.061251"], ["date_accepted", "2020-10-07 15:23:21.060917"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.061229"], ["updated_at", "2020-10-07 15:23:21.061229"]]
37100
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37101
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'employer') [["user_id", 1]]
37102
+  (0.1ms) rollback transaction
37103
+  (0.0ms) begin transaction
37104
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37105
+  (0.0ms) SAVEPOINT active_record_1
37106
+ User Create (0.2ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.063764"], ["updated_at", "2020-10-07 15:23:21.063764"]]
37107
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37108
+  (0.0ms) SAVEPOINT active_record_1
37109
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:21.064864"], ["updated_at", "2020-10-07 15:23:21.064864"]]
37110
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37111
+  (0.1ms) SAVEPOINT active_record_1
37112
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.065975"], ["date_accepted", "2020-10-07 15:23:21.065540"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.065947"], ["updated_at", "2020-10-07 15:23:21.065947"]]
37113
+  (0.1ms) RELEASE SAVEPOINT active_record_1
37114
+  (0.2ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
37115
+  (0.2ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 1]]
37116
+  (0.5ms) rollback transaction
37117
+  (0.1ms) begin transaction
37118
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
37119
+  (0.0ms) SAVEPOINT active_record_1
37120
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:21.073667"], ["updated_at", "2020-10-07 15:23:21.073667"]]
37121
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37122
+  (0.0ms) SAVEPOINT active_record_1
37123
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:21.074601"], ["updated_at", "2020-10-07 15:23:21.074601"]]
37124
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37125
+  (0.0ms) SAVEPOINT active_record_1
37126
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.075555"], ["date_accepted", "2020-10-07 15:23:21.075185"], ["claim_hash", "33e4c701d9603515b68067c3f1b42e63adaa0f1a"], ["created_at", "2020-10-07 15:23:21.075531"], ["updated_at", "2020-10-07 15:23:21.075531"]]
37127
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37128
+  (0.0ms) SAVEPOINT active_record_1
37129
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.076400"], ["updated_at", "2020-10-07 15:23:21.076400"]]
37130
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37131
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 2]]
37132
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 2]]
37133
+  (0.1ms) rollback transaction
37134
+  (0.0ms) begin transaction
37135
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
37136
+  (0.0ms) SAVEPOINT active_record_1
37137
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.079155"], ["updated_at", "2020-10-07 15:23:21.079155"]]
37138
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37139
+  (0.0ms) SAVEPOINT active_record_1
37140
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:21.080027"], ["updated_at", "2020-10-07 15:23:21.080027"]]
37141
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37142
+  (0.0ms) SAVEPOINT active_record_1
37143
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.080972"], ["date_accepted", "2020-10-07 15:23:21.080611"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.080948"], ["updated_at", "2020-10-07 15:23:21.080948"]]
37144
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37145
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
37146
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 1]]
37147
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) ORDER BY "invitations"."id" ASC LIMIT ? [["user_id", 1], ["LIMIT", 1]]
37148
+  (0.1ms) rollback transaction
37149
+  (0.0ms) begin transaction
37150
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37151
+  (0.0ms) SAVEPOINT active_record_1
37152
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.084000"], ["updated_at", "2020-10-07 15:23:21.084000"]]
37153
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37154
+  (0.0ms) SAVEPOINT active_record_1
37155
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:21.084927"], ["updated_at", "2020-10-07 15:23:21.084927"]]
37156
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37157
+  (0.0ms) SAVEPOINT active_record_1
37158
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.085902"], ["date_accepted", "2020-10-07 15:23:21.085556"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.085879"], ["updated_at", "2020-10-07 15:23:21.085879"]]
37159
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37160
+  (0.0ms) SAVEPOINT active_record_1
37161
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:21.086821"], ["updated_at", "2020-10-07 15:23:21.086821"]]
37162
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37163
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 2]]
37164
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 2]]
37165
+  (0.1ms) rollback transaction
37166
+  (0.0ms) begin transaction
37167
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37168
+  (0.0ms) SAVEPOINT active_record_1
37169
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.089294"], ["updated_at", "2020-10-07 15:23:21.089294"]]
37170
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37171
+  (0.0ms) SAVEPOINT active_record_1
37172
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:21.090081"], ["updated_at", "2020-10-07 15:23:21.090081"]]
37173
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37174
+  (0.0ms) SAVEPOINT active_record_1
37175
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.091008"], ["date_accepted", "2020-10-07 15:23:21.090669"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.090985"], ["updated_at", "2020-10-07 15:23:21.090985"]]
37176
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37177
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
37178
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 1]]
37179
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) ORDER BY "invitations"."id" ASC LIMIT ? [["user_id", 1], ["LIMIT", 1]]
37180
+  (0.1ms) rollback transaction
37181
+  (0.0ms) begin transaction
37182
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37183
+  (0.0ms) SAVEPOINT active_record_1
37184
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.094225"], ["updated_at", "2020-10-07 15:23:21.094225"]]
37185
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37186
+  (0.0ms) SAVEPOINT active_record_1
37187
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:21.095170"], ["updated_at", "2020-10-07 15:23:21.095170"]]
37188
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37189
+  (0.0ms) SAVEPOINT active_record_1
37190
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.096190"], ["date_accepted", "2020-10-07 15:23:21.095820"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.096166"], ["updated_at", "2020-10-07 15:23:21.096166"]]
37191
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37192
+  (0.1ms) SAVEPOINT active_record_1
37193
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."user_id" = ? [["user_id", 1]]
37194
+ Invitation Destroy (0.1ms) DELETE FROM "invitations" WHERE "invitations"."id" = ? [["id", 1]]
37195
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 1]]
37196
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37197
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
37198
+  (0.1ms) rollback transaction
37199
+  (0.0ms) begin transaction
37200
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
37201
+  (0.2ms) SAVEPOINT active_record_1
37202
+ User Create (0.5ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:21.100842"], ["updated_at", "2020-10-07 15:23:21.100842"]]
37203
+  (0.2ms) RELEASE SAVEPOINT active_record_1
37204
+  (0.1ms) SAVEPOINT active_record_1
37205
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "uberadmin"], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.104983"], ["claim_hash", "33e4c701d9603515b68067c3f1b42e63adaa0f1a"], ["created_at", "2020-10-07 15:23:21.104952"], ["updated_at", "2020-10-07 15:23:21.104952"]]
37206
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37207
+ User Load (0.1ms) SELECT "users".* FROM "users" INNER JOIN "invitations" ON "invitations"."user_id" = "users"."id" WHERE (invitable_id IS NULL AND role = 'uberadmin')
37208
+  (0.0ms) SAVEPOINT active_record_1
37209
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.108319"], ["updated_at", "2020-10-07 15:23:21.108319"]]
37210
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37211
+ User Load (0.1ms) SELECT "users".* FROM "users" INNER JOIN "invitations" ON "invitations"."user_id" = "users"."id" WHERE (invitable_id IS NULL AND role = 'uberadmin')
37212
+  (0.1ms) rollback transaction
37213
+  (0.0ms) begin transaction
37214
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37215
+  (0.0ms) SAVEPOINT active_record_1
37216
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:21.110538"], ["updated_at", "2020-10-07 15:23:21.110538"]]
37217
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37218
+  (0.0ms) SAVEPOINT active_record_1
37219
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "employer"], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.111454"], ["claim_hash", "33e4c701d9603515b68067c3f1b42e63adaa0f1a"], ["created_at", "2020-10-07 15:23:21.111431"], ["updated_at", "2020-10-07 15:23:21.111431"]]
37220
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37221
+ User Load (0.1ms) SELECT "users".* FROM "users" INNER JOIN "invitations" ON "invitations"."user_id" = "users"."id" WHERE (invitable_id IS NULL AND role = 'employer')
37222
+  (0.0ms) SAVEPOINT active_record_1
37223
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.112928"], ["updated_at", "2020-10-07 15:23:21.112928"]]
37224
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37225
+ User Load (0.1ms) SELECT "users".* FROM "users" INNER JOIN "invitations" ON "invitations"."user_id" = "users"."id" WHERE (invitable_id IS NULL AND role = 'employer')
37226
+  (0.1ms) rollback transaction
37227
+  (0.0ms) begin transaction
37228
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37229
+  (0.0ms) SAVEPOINT active_record_1
37230
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.115205"], ["updated_at", "2020-10-07 15:23:21.115205"]]
37231
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37232
+  (0.0ms) SAVEPOINT active_record_1
37233
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity"], ["created_at", "2020-10-07 15:23:21.116042"], ["updated_at", "2020-10-07 15:23:21.116042"]]
37234
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37235
+  (0.0ms) SAVEPOINT active_record_1
37236
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.116970"], ["date_accepted", "2020-10-07 15:23:21.116625"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.116947"], ["updated_at", "2020-10-07 15:23:21.116947"]]
37237
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37238
+  (0.0ms) SAVEPOINT active_record_1
37239
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:21.117802"], ["updated_at", "2020-10-07 15:23:21.117802"]]
37240
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37241
+  (0.0ms) SAVEPOINT active_record_1
37242
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 2], ["date_sent", "2020-10-07 15:23:21.118567"], ["claim_hash", "84b322578b3c7f044a898174d768c3eab2da1ba3"], ["created_at", "2020-10-07 15:23:21.118545"], ["updated_at", "2020-10-07 15:23:21.118545"]]
37243
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37244
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
37245
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 1]]
37246
+  (0.1ms) rollback transaction
37247
+  (0.0ms) begin transaction
37248
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37249
+  (0.0ms) SAVEPOINT active_record_1
37250
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.121276"], ["updated_at", "2020-10-07 15:23:21.121276"]]
37251
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37252
+  (0.0ms) SAVEPOINT active_record_1
37253
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity"], ["created_at", "2020-10-07 15:23:21.122125"], ["updated_at", "2020-10-07 15:23:21.122125"]]
37254
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37255
+  (0.0ms) SAVEPOINT active_record_1
37256
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.123050"], ["date_accepted", "2020-10-07 15:23:21.122703"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.123028"], ["updated_at", "2020-10-07 15:23:21.123028"]]
37257
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37258
+  (0.0ms) SAVEPOINT active_record_1
37259
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:21.123891"], ["updated_at", "2020-10-07 15:23:21.123891"]]
37260
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37261
+  (0.0ms) SAVEPOINT active_record_1
37262
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 2], ["date_sent", "2020-10-07 15:23:21.124680"], ["claim_hash", "84b322578b3c7f044a898174d768c3eab2da1ba3"], ["created_at", "2020-10-07 15:23:21.124658"], ["updated_at", "2020-10-07 15:23:21.124658"]]
37263
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37264
+  (0.0ms) SAVEPOINT active_record_1
37265
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:21.125453"], ["updated_at", "2020-10-07 15:23:21.125453"]]
37266
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37267
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 3]]
37268
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 3]]
37269
+  (0.1ms) rollback transaction
37270
+  (0.0ms) begin transaction
37271
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
37272
+  (0.0ms) SAVEPOINT active_record_1
37273
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.128525"], ["updated_at", "2020-10-07 15:23:21.128525"]]
37274
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37275
+  (0.0ms) SAVEPOINT active_record_1
37276
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity"], ["created_at", "2020-10-07 15:23:21.129622"], ["updated_at", "2020-10-07 15:23:21.129622"]]
37277
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37278
+  (0.0ms) SAVEPOINT active_record_1
37279
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.130786"], ["date_accepted", "2020-10-07 15:23:21.130367"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.130760"], ["updated_at", "2020-10-07 15:23:21.130760"]]
37280
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37281
+  (0.0ms) SAVEPOINT active_record_1
37282
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:21.131855"], ["updated_at", "2020-10-07 15:23:21.131855"]]
37283
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37284
+  (0.0ms) SAVEPOINT active_record_1
37285
+ Invitation Create (0.2ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 2], ["date_sent", "2020-10-07 15:23:21.132914"], ["claim_hash", "84b322578b3c7f044a898174d768c3eab2da1ba3"], ["created_at", "2020-10-07 15:23:21.132890"], ["updated_at", "2020-10-07 15:23:21.132890"]]
37286
+  (0.2ms) RELEASE SAVEPOINT active_record_1
37287
+  (0.4ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 2]]
37288
+  (0.1ms) rollback transaction
37289
+  (0.0ms) begin transaction
37290
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
37291
+  (0.0ms) SAVEPOINT active_record_1
37292
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.139092"], ["updated_at", "2020-10-07 15:23:21.139092"]]
37293
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37294
+  (0.0ms) SAVEPOINT active_record_1
37295
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity"], ["created_at", "2020-10-07 15:23:21.140024"], ["updated_at", "2020-10-07 15:23:21.140024"]]
37296
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37297
+  (0.0ms) SAVEPOINT active_record_1
37298
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.141035"], ["date_accepted", "2020-10-07 15:23:21.140650"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.141012"], ["updated_at", "2020-10-07 15:23:21.141012"]]
37299
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37300
+  (0.0ms) SAVEPOINT active_record_1
37301
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:21.141887"], ["updated_at", "2020-10-07 15:23:21.141887"]]
37302
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37303
+  (0.0ms) SAVEPOINT active_record_1
37304
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 2], ["date_sent", "2020-10-07 15:23:21.142655"], ["claim_hash", "84b322578b3c7f044a898174d768c3eab2da1ba3"], ["created_at", "2020-10-07 15:23:21.142635"], ["updated_at", "2020-10-07 15:23:21.142635"]]
37305
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37306
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
37307
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 1]]
37308
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) ORDER BY "invitations"."id" ASC LIMIT ? [["user_id", 1], ["LIMIT", 1]]
37309
+  (0.1ms) rollback transaction
37310
+  (0.0ms) begin transaction
37311
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37312
+  (0.0ms) SAVEPOINT active_record_1
37313
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.145630"], ["updated_at", "2020-10-07 15:23:21.145630"]]
37314
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37315
+  (0.0ms) SAVEPOINT active_record_1
37316
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity"], ["created_at", "2020-10-07 15:23:21.146459"], ["updated_at", "2020-10-07 15:23:21.146459"]]
37317
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37318
+  (0.0ms) SAVEPOINT active_record_1
37319
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.147382"], ["date_accepted", "2020-10-07 15:23:21.147037"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.147359"], ["updated_at", "2020-10-07 15:23:21.147359"]]
37320
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37321
+  (0.0ms) SAVEPOINT active_record_1
37322
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:21.148309"], ["updated_at", "2020-10-07 15:23:21.148309"]]
37323
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37324
+  (0.0ms) SAVEPOINT active_record_1
37325
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 2], ["date_sent", "2020-10-07 15:23:21.149101"], ["claim_hash", "84b322578b3c7f044a898174d768c3eab2da1ba3"], ["created_at", "2020-10-07 15:23:21.149076"], ["updated_at", "2020-10-07 15:23:21.149076"]]
37326
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37327
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
37328
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 1]]
37329
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) ORDER BY "invitations"."id" ASC LIMIT ? [["user_id", 1], ["LIMIT", 1]]
37330
+  (0.1ms) rollback transaction
37331
+  (0.0ms) begin transaction
37332
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37333
+  (0.0ms) SAVEPOINT active_record_1
37334
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.152116"], ["updated_at", "2020-10-07 15:23:21.152116"]]
37335
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37336
+  (0.0ms) SAVEPOINT active_record_1
37337
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity"], ["created_at", "2020-10-07 15:23:21.152978"], ["updated_at", "2020-10-07 15:23:21.152978"]]
37338
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37339
+  (0.0ms) SAVEPOINT active_record_1
37340
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.153886"], ["date_accepted", "2020-10-07 15:23:21.153560"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.153864"], ["updated_at", "2020-10-07 15:23:21.153864"]]
37341
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37342
+  (0.0ms) SAVEPOINT active_record_1
37343
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:21.154721"], ["updated_at", "2020-10-07 15:23:21.154721"]]
37344
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37345
+  (0.0ms) SAVEPOINT active_record_1
37346
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 2], ["date_sent", "2020-10-07 15:23:21.155634"], ["claim_hash", "84b322578b3c7f044a898174d768c3eab2da1ba3"], ["created_at", "2020-10-07 15:23:21.155611"], ["updated_at", "2020-10-07 15:23:21.155611"]]
37347
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37348
+  (0.0ms) SAVEPOINT active_record_1
37349
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:21.156474"], ["updated_at", "2020-10-07 15:23:21.156474"]]
37350
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37351
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 3]]
37352
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 3]]
37353
+  (0.1ms) rollback transaction
37354
+  (0.0ms) begin transaction
37355
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
37356
+  (0.0ms) SAVEPOINT active_record_1
37357
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.159474"], ["updated_at", "2020-10-07 15:23:21.159474"]]
37358
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37359
+  (0.0ms) SAVEPOINT active_record_1
37360
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity"], ["created_at", "2020-10-07 15:23:21.160594"], ["updated_at", "2020-10-07 15:23:21.160594"]]
37361
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37362
+  (0.0ms) SAVEPOINT active_record_1
37363
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.161718"], ["date_accepted", "2020-10-07 15:23:21.161304"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.161692"], ["updated_at", "2020-10-07 15:23:21.161692"]]
37364
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37365
+  (0.0ms) SAVEPOINT active_record_1
37366
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:21.162843"], ["updated_at", "2020-10-07 15:23:21.162843"]]
37367
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37368
+  (0.0ms) SAVEPOINT active_record_1
37369
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 2], ["date_sent", "2020-10-07 15:23:21.163794"], ["claim_hash", "84b322578b3c7f044a898174d768c3eab2da1ba3"], ["created_at", "2020-10-07 15:23:21.163766"], ["updated_at", "2020-10-07 15:23:21.163766"]]
37370
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37371
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 2]]
37372
+  (0.1ms) rollback transaction
37373
+  (0.1ms) begin transaction
37374
+ Invitation Load (0.2ms) SELECT "invitations".* FROM "invitations"
37375
+  (0.2ms) SAVEPOINT active_record_1
37376
+ User Create (0.2ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.167882"], ["updated_at", "2020-10-07 15:23:21.167882"]]
37377
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37378
+  (0.0ms) SAVEPOINT active_record_1
37379
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity"], ["created_at", "2020-10-07 15:23:21.170396"], ["updated_at", "2020-10-07 15:23:21.170396"]]
37380
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37381
+  (0.0ms) SAVEPOINT active_record_1
37382
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.171435"], ["date_accepted", "2020-10-07 15:23:21.171059"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.171412"], ["updated_at", "2020-10-07 15:23:21.171412"]]
37383
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37384
+  (0.0ms) SAVEPOINT active_record_1
37385
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:21.172275"], ["updated_at", "2020-10-07 15:23:21.172275"]]
37386
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37387
+  (0.0ms) SAVEPOINT active_record_1
37388
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 2], ["date_sent", "2020-10-07 15:23:21.173039"], ["claim_hash", "84b322578b3c7f044a898174d768c3eab2da1ba3"], ["created_at", "2020-10-07 15:23:21.173018"], ["updated_at", "2020-10-07 15:23:21.173018"]]
37389
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37390
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
37391
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 1]]
37392
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) ORDER BY "invitations"."id" ASC LIMIT ? [["user_id", 1], ["LIMIT", 1]]
37393
+  (0.1ms) rollback transaction
37394
+  (0.0ms) begin transaction
37395
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37396
+  (0.1ms) SAVEPOINT active_record_1
37397
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.176150"], ["updated_at", "2020-10-07 15:23:21.176150"]]
37398
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37399
+  (0.0ms) SAVEPOINT active_record_1
37400
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity"], ["created_at", "2020-10-07 15:23:21.177026"], ["updated_at", "2020-10-07 15:23:21.177026"]]
37401
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37402
+  (0.0ms) SAVEPOINT active_record_1
37403
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.177958"], ["date_accepted", "2020-10-07 15:23:21.177622"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.177932"], ["updated_at", "2020-10-07 15:23:21.177932"]]
37404
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37405
+  (0.0ms) SAVEPOINT active_record_1
37406
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:21.178777"], ["updated_at", "2020-10-07 15:23:21.178777"]]
37407
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37408
+  (0.0ms) SAVEPOINT active_record_1
37409
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 2], ["date_sent", "2020-10-07 15:23:21.179552"], ["claim_hash", "84b322578b3c7f044a898174d768c3eab2da1ba3"], ["created_at", "2020-10-07 15:23:21.179530"], ["updated_at", "2020-10-07 15:23:21.179530"]]
37410
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37411
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
37412
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 1]]
37413
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) ORDER BY "invitations"."id" ASC LIMIT ? [["user_id", 1], ["LIMIT", 1]]
37414
+  (0.1ms) rollback transaction
37415
+  (0.0ms) begin transaction
37416
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37417
+  (0.0ms) SAVEPOINT active_record_1
37418
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.182494"], ["updated_at", "2020-10-07 15:23:21.182494"]]
37419
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37420
+  (0.0ms) SAVEPOINT active_record_1
37421
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity"], ["created_at", "2020-10-07 15:23:21.183381"], ["updated_at", "2020-10-07 15:23:21.183381"]]
37422
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37423
+  (0.0ms) SAVEPOINT active_record_1
37424
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.184325"], ["date_accepted", "2020-10-07 15:23:21.183978"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.184302"], ["updated_at", "2020-10-07 15:23:21.184302"]]
37425
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37426
+  (0.0ms) SAVEPOINT active_record_1
37427
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:21.185136"], ["updated_at", "2020-10-07 15:23:21.185136"]]
37428
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37429
+  (0.0ms) SAVEPOINT active_record_1
37430
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 2], ["date_sent", "2020-10-07 15:23:21.185894"], ["claim_hash", "84b322578b3c7f044a898174d768c3eab2da1ba3"], ["created_at", "2020-10-07 15:23:21.185874"], ["updated_at", "2020-10-07 15:23:21.185874"]]
37431
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37432
+  (0.0ms) SAVEPOINT active_record_1
37433
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:21.186641"], ["updated_at", "2020-10-07 15:23:21.186641"]]
37434
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37435
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 3]]
37436
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 3]]
37437
+  (0.1ms) rollback transaction
37438
+  (0.0ms) begin transaction
37439
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
37440
+  (0.1ms) SAVEPOINT active_record_1
37441
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test1@d-i.co"], ["created_at", "2020-10-07 15:23:21.189451"], ["updated_at", "2020-10-07 15:23:21.189451"]]
37442
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37443
+  (0.0ms) SAVEPOINT active_record_1
37444
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity"], ["created_at", "2020-10-07 15:23:21.190665"], ["updated_at", "2020-10-07 15:23:21.190665"]]
37445
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37446
+  (0.0ms) SAVEPOINT active_record_1
37447
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test1@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.191926"], ["date_accepted", "2020-10-07 15:23:21.191480"], ["claim_hash", "ea7b166242301b453da7a97c1add873669468fe5"], ["created_at", "2020-10-07 15:23:21.191900"], ["updated_at", "2020-10-07 15:23:21.191900"]]
37448
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37449
+  (0.0ms) SAVEPOINT active_record_1
37450
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test3@d-i.co"], ["created_at", "2020-10-07 15:23:21.192968"], ["updated_at", "2020-10-07 15:23:21.192968"]]
37451
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37452
+  (0.0ms) SAVEPOINT active_record_1
37453
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test3@d-i.co"], ["role", "uberadmin"], ["user_id", 2], ["date_sent", "2020-10-07 15:23:21.193885"], ["claim_hash", "84b322578b3c7f044a898174d768c3eab2da1ba3"], ["created_at", "2020-10-07 15:23:21.193861"], ["updated_at", "2020-10-07 15:23:21.193861"]]
37454
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37455
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 2]]
37456
+  (0.1ms) rollback transaction
37457
+  (0.0ms) begin transaction
37458
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
37459
+  (0.1ms) SAVEPOINT active_record_1
37460
+ User Create (0.2ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test@d-i.co"], ["created_at", "2020-10-07 15:23:21.196682"], ["updated_at", "2020-10-07 15:23:21.196682"]]
37461
+  (0.1ms) RELEASE SAVEPOINT active_record_1
37462
+  (0.1ms) SAVEPOINT active_record_1
37463
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:21.198431"], ["updated_at", "2020-10-07 15:23:21.198431"]]
37464
+  (0.1ms) RELEASE SAVEPOINT active_record_1
37465
+  (0.1ms) SAVEPOINT active_record_1
37466
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["email", "test@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["date_sent", "2020-10-07 15:23:21.199970"], ["claim_hash", "778f6c83b7f593eae8a35c6fa0fae3c4b6472da8"], ["created_at", "2020-10-07 15:23:21.199941"], ["updated_at", "2020-10-07 15:23:21.199941"]]
37467
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37468
+  (0.1ms) SAVEPOINT active_record_1
37469
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 2"], ["created_at", "2020-10-07 15:23:21.201210"], ["updated_at", "2020-10-07 15:23:21.201210"]]
37470
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37471
+  (0.1ms) SAVEPOINT active_record_1
37472
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["email", "test@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 2], ["date_sent", "2020-10-07 15:23:21.202632"], ["claim_hash", "778f6c83b7f593eae8a35c6fa0fae3c4b6472da8"], ["created_at", "2020-10-07 15:23:21.202595"], ["updated_at", "2020-10-07 15:23:21.202595"]]
37473
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37474
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE (email = 'test@d-i.co' AND user_id IS NULL)
37475
+  (0.0ms) SAVEPOINT active_record_1
37476
+ Entity Load (0.0ms) SELECT "entities".* FROM "entities" WHERE "entities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
37477
+ Invitation Update (0.1ms) UPDATE "invitations" SET "user_id" = ?, "date_accepted" = ?, "updated_at" = ? WHERE "invitations"."id" = ? [["user_id", 1], ["date_accepted", "2020-10-07 15:23:21.203990"], ["updated_at", "2020-10-07 15:23:21.204702"], ["id", 1]]
37478
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37479
+  (0.0ms) SAVEPOINT active_record_1
37480
+ Entity Load (0.0ms) SELECT "entities".* FROM "entities" WHERE "entities"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
37481
+ Invitation Update (0.1ms) UPDATE "invitations" SET "user_id" = ?, "date_accepted" = ?, "updated_at" = ? WHERE "invitations"."id" = ? [["user_id", 1], ["date_accepted", "2020-10-07 15:23:21.205259"], ["updated_at", "2020-10-07 15:23:21.205812"], ["id", 2]]
37482
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37483
+ Invitation Exists? (0.1ms) SELECT 1 AS one FROM "invitations" WHERE "invitations"."user_id" = ? AND "invitations"."id" = ? LIMIT ? [["user_id", 1], ["id", 1], ["LIMIT", 1]]
37484
+ Invitation Exists? (0.1ms) SELECT 1 AS one FROM "invitations" WHERE "invitations"."user_id" = ? AND "invitations"."id" = ? LIMIT ? [["user_id", 1], ["id", 2], ["LIMIT", 1]]
37485
+  (0.1ms) rollback transaction
37486
+  (0.0ms) begin transaction
37487
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37488
+  (0.0ms) SAVEPOINT active_record_1
37489
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity 1"], ["created_at", "2020-10-07 15:23:21.208253"], ["updated_at", "2020-10-07 15:23:21.208253"]]
37490
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37491
+  (0.0ms) SAVEPOINT active_record_1
37492
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["email", "foo@d-i.co"], ["role", "user"], ["invitable_type", "Entity"], ["invitable_id", 1], ["date_sent", "2020-10-07 15:23:21.209197"], ["claim_hash", "b0bf320de5326f4b0ac2beebf3b4e465e4e442fa"], ["created_at", "2020-10-07 15:23:21.209170"], ["updated_at", "2020-10-07 15:23:21.209170"]]
37493
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37494
+  (0.1ms) SAVEPOINT active_record_1
37495
+ User Create (1.6ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test@d-i.co"], ["created_at", "2020-10-07 15:23:21.216786"], ["updated_at", "2020-10-07 15:23:21.216786"]]
37496
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37497
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE (email = 'test@d-i.co' AND user_id IS NULL)
37498
+ Invitation Exists? (0.1ms) SELECT 1 AS one FROM "invitations" WHERE "invitations"."user_id" = ? AND "invitations"."id" = ? LIMIT ? [["user_id", 1], ["id", 1], ["LIMIT", 1]]
37499
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."user_id" = ? [["user_id", 1]]
37500
+  (0.1ms) rollback transaction
37501
+  (0.0ms) begin transaction
37502
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
37503
+  (0.1ms) SAVEPOINT active_record_1
37504
+ User Create (0.2ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test@d-i.co"], ["created_at", "2020-10-07 15:23:21.222314"], ["updated_at", "2020-10-07 15:23:21.222314"]]
37505
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37506
+  (0.0ms) SAVEPOINT active_record_1
37507
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity"], ["created_at", "2020-10-07 15:23:21.223444"], ["updated_at", "2020-10-07 15:23:21.223444"]]
37508
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37509
+  (0.0ms) SAVEPOINT active_record_1
37510
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["email", "test@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["date_sent", "2020-10-07 15:23:21.224619"], ["claim_hash", "778f6c83b7f593eae8a35c6fa0fae3c4b6472da8"], ["created_at", "2020-10-07 15:23:21.224584"], ["updated_at", "2020-10-07 15:23:21.224584"]]
37511
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37512
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE (claim_hash = '778f6c83b7f593eae8a35c6fa0fae3c4b6472da8') ORDER BY "invitations"."id" ASC LIMIT ? [["LIMIT", 1]]
37513
+  (0.0ms) SAVEPOINT active_record_1
37514
+ Entity Load (0.0ms) SELECT "entities".* FROM "entities" WHERE "entities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
37515
+ Invitation Update (0.1ms) UPDATE "invitations" SET "date_accepted" = ?, "user_id" = ?, "updated_at" = ? WHERE "invitations"."id" = ? [["date_accepted", "2020-10-07 15:23:21.226017"], ["user_id", 1], ["updated_at", "2020-10-07 15:23:21.226865"], ["id", 1]]
37516
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37517
+ Invitation Exists? (0.2ms) SELECT 1 AS one FROM "invitations" WHERE "invitations"."user_id" = ? AND "invitations"."id" = ? LIMIT ? [["user_id", 1], ["id", 1], ["LIMIT", 1]]
37518
+  (0.5ms) rollback transaction
37519
+  (0.3ms) begin transaction
37520
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
37521
+  (0.0ms) SAVEPOINT active_record_1
37522
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity"], ["created_at", "2020-10-07 15:23:21.232657"], ["updated_at", "2020-10-07 15:23:21.232657"]]
37523
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37524
+  (0.0ms) SAVEPOINT active_record_1
37525
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["email", "foo@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["date_sent", "2020-10-07 15:23:21.233757"], ["claim_hash", "b0bf320de5326f4b0ac2beebf3b4e465e4e442fa"], ["created_at", "2020-10-07 15:23:21.233733"], ["updated_at", "2020-10-07 15:23:21.233733"]]
37526
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37527
+  (0.0ms) SAVEPOINT active_record_1
37528
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test@d-i.co"], ["created_at", "2020-10-07 15:23:21.234615"], ["updated_at", "2020-10-07 15:23:21.234615"]]
37529
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37530
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE (claim_hash = 'b0bf320de5326f4b0ac2beebf3b4e465e4e442fa') ORDER BY "invitations"."id" ASC LIMIT ? [["LIMIT", 1]]
37531
+  (0.0ms) SAVEPOINT active_record_1
37532
+ Entity Load (0.0ms) SELECT "entities".* FROM "entities" WHERE "entities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
37533
+ Invitation Update (0.1ms) UPDATE "invitations" SET "date_accepted" = ?, "user_id" = ?, "updated_at" = ? WHERE "invitations"."id" = ? [["date_accepted", "2020-10-07 15:23:21.235682"], ["user_id", 1], ["updated_at", "2020-10-07 15:23:21.236384"], ["id", 1]]
37534
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37535
+ Invitation Exists? (0.1ms) SELECT 1 AS one FROM "invitations" WHERE "invitations"."user_id" = ? AND "invitations"."id" = ? LIMIT ? [["user_id", 1], ["id", 1], ["LIMIT", 1]]
37536
+  (0.1ms) rollback transaction
37537
+  (0.0ms) begin transaction
37538
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37539
+  (0.0ms) SAVEPOINT active_record_1
37540
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "foo@bar.com"], ["created_at", "2020-10-07 15:23:21.238658"], ["updated_at", "2020-10-07 15:23:21.238658"]]
37541
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37542
+  (0.0ms) SAVEPOINT active_record_1
37543
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity"], ["created_at", "2020-10-07 15:23:21.239532"], ["updated_at", "2020-10-07 15:23:21.239532"]]
37544
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37545
+  (0.0ms) SAVEPOINT active_record_1
37546
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "foo@bar.com"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.240477"], ["date_accepted", "2020-10-07 15:23:21.240124"], ["claim_hash", "6bd47648c4f470d1a2dde02ad3ab8a5915056281"], ["created_at", "2020-10-07 15:23:21.240454"], ["updated_at", "2020-10-07 15:23:21.240454"]]
37547
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37548
+  (0.0ms) SAVEPOINT active_record_1
37549
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test@d-i.co"], ["created_at", "2020-10-07 15:23:21.241318"], ["updated_at", "2020-10-07 15:23:21.241318"]]
37550
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37551
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE (claim_hash = '6bd47648c4f470d1a2dde02ad3ab8a5915056281') ORDER BY "invitations"."id" ASC LIMIT ? [["LIMIT", 1]]
37552
+ Invitation Exists? (0.1ms) SELECT 1 AS one FROM "invitations" WHERE "invitations"."user_id" = ? AND "invitations"."id" = ? LIMIT ? [["user_id", 2], ["id", 1], ["LIMIT", 1]]
37553
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."user_id" = ? [["user_id", 2]]
37554
+  (0.1ms) rollback transaction
37555
+  (0.0ms) begin transaction
37556
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37557
+  (0.0ms) SAVEPOINT active_record_1
37558
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test@d-i.co"], ["created_at", "2020-10-07 15:23:21.244264"], ["updated_at", "2020-10-07 15:23:21.244264"]]
37559
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37560
+  (0.0ms) SAVEPOINT active_record_1
37561
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test entity"], ["created_at", "2020-10-07 15:23:21.245188"], ["updated_at", "2020-10-07 15:23:21.245188"]]
37562
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37563
+  (0.0ms) SAVEPOINT active_record_1
37564
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["email", "test@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["date_sent", "2020-10-07 15:23:21.246112"], ["claim_hash", "778f6c83b7f593eae8a35c6fa0fae3c4b6472da8"], ["created_at", "2020-10-07 15:23:21.246088"], ["updated_at", "2020-10-07 15:23:21.246088"]]
37565
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37566
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations" WHERE (claim_hash = 'THIS_IS_A_BAD_HASH') ORDER BY "invitations"."id" ASC LIMIT ? [["LIMIT", 1]]
37567
+ Invitation Exists? (0.1ms) SELECT 1 AS one FROM "invitations" WHERE "invitations"."user_id" = ? AND "invitations"."id" = ? LIMIT ? [["user_id", 1], ["id", 1], ["LIMIT", 1]]
37568
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations" WHERE "invitations"."user_id" = ? [["user_id", 1]]
37569
+  (0.1ms) rollback transaction
37570
+  (0.0ms) begin transaction
37571
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
37572
+  (0.0ms) SAVEPOINT active_record_1
37573
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test Entity"], ["created_at", "2020-10-07 15:23:21.249365"], ["updated_at", "2020-10-07 15:23:21.249365"]]
37574
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37575
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."invitable_id" = ? AND "invitations"."invitable_type" = ? AND (email = 'test@d-i.co') [["invitable_id", 1], ["invitable_type", "Entity"]]
37576
+  (0.1ms) SAVEPOINT active_record_1
37577
+ Invitation Create (0.2ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["email", "test@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["date_sent", "2020-10-07 15:23:21.251186"], ["claim_hash", "778f6c83b7f593eae8a35c6fa0fae3c4b6472da8"], ["created_at", "2020-10-07 15:23:21.251155"], ["updated_at", "2020-10-07 15:23:21.251155"]]
37578
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37579
+  (0.1ms) rollback transaction
37580
+  (0.0ms) begin transaction
37581
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
37582
+  (0.0ms) SAVEPOINT active_record_1
37583
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test Entity"], ["created_at", "2020-10-07 15:23:21.253868"], ["updated_at", "2020-10-07 15:23:21.253868"]]
37584
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37585
+  (0.0ms) SAVEPOINT active_record_1
37586
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["email", "test@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["date_sent", "2020-10-07 15:23:21.255026"], ["claim_hash", "778f6c83b7f593eae8a35c6fa0fae3c4b6472da8"], ["created_at", "2020-10-07 15:23:21.255000"], ["updated_at", "2020-10-07 15:23:21.255000"]]
37587
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37588
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."invitable_id" = ? AND "invitations"."invitable_type" = ? AND (email = 'test@d-i.co') [["invitable_id", 1], ["invitable_type", "Entity"]]
37589
+  (0.1ms) rollback transaction
37590
+  (0.0ms) begin transaction
37591
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
37592
+  (0.0ms) SAVEPOINT active_record_1
37593
+ Entity Create (0.2ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test Entity"], ["created_at", "2020-10-07 15:23:21.258003"], ["updated_at", "2020-10-07 15:23:21.258003"]]
37594
+  (0.1ms) RELEASE SAVEPOINT active_record_1
37595
+  (0.1ms) SAVEPOINT active_record_1
37596
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test@d-i.co"], ["created_at", "2020-10-07 15:23:21.259567"], ["updated_at", "2020-10-07 15:23:21.259567"]]
37597
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37598
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 1]]
37599
+  (0.1ms) SAVEPOINT active_record_1
37600
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.262100"], ["date_accepted", "2020-10-07 15:23:21.261812"], ["claim_hash", "778f6c83b7f593eae8a35c6fa0fae3c4b6472da8"], ["created_at", "2020-10-07 15:23:21.262069"], ["updated_at", "2020-10-07 15:23:21.262069"]]
37601
+  (0.1ms) RELEASE SAVEPOINT active_record_1
37602
+  (0.1ms) rollback transaction
37603
+  (0.0ms) begin transaction
37604
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
37605
+  (0.0ms) SAVEPOINT active_record_1
37606
+ Entity Create (0.1ms) INSERT INTO "entities" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Test Entity"], ["created_at", "2020-10-07 15:23:21.265014"], ["updated_at", "2020-10-07 15:23:21.265014"]]
37607
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37608
+  (0.0ms) SAVEPOINT active_record_1
37609
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test@d-i.co"], ["created_at", "2020-10-07 15:23:21.265969"], ["updated_at", "2020-10-07 15:23:21.265969"]]
37610
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37611
+  (0.0ms) SAVEPOINT active_record_1
37612
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "invitable_type", "invitable_id", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["email", "test@d-i.co"], ["role", "admin"], ["invitable_type", "Entity"], ["invitable_id", 1], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.267062"], ["claim_hash", "778f6c83b7f593eae8a35c6fa0fae3c4b6472da8"], ["created_at", "2020-10-07 15:23:21.267037"], ["updated_at", "2020-10-07 15:23:21.267037"]]
37613
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37614
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_type = 'Entity' AND invitable_id = 1) [["user_id", 1]]
37615
+  (0.1ms) rollback transaction
37616
+  (0.0ms) begin transaction
37617
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37618
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE (invitable_id IS NULL AND role = 'employer') AND (email = 'test@d-i.co')
37619
+  (0.0ms) SAVEPOINT active_record_1
37620
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@d-i.co"], ["role", "employer"], ["date_sent", "2020-10-07 15:23:21.270095"], ["claim_hash", "778f6c83b7f593eae8a35c6fa0fae3c4b6472da8"], ["created_at", "2020-10-07 15:23:21.270071"], ["updated_at", "2020-10-07 15:23:21.270071"]]
37621
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37622
+  (0.1ms) rollback transaction
37623
+  (0.0ms) begin transaction
37624
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37625
+  (0.0ms) SAVEPOINT active_record_1
37626
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@d-i.co"], ["role", "employer"], ["date_sent", "2020-10-07 15:23:21.271919"], ["claim_hash", "778f6c83b7f593eae8a35c6fa0fae3c4b6472da8"], ["created_at", "2020-10-07 15:23:21.271897"], ["updated_at", "2020-10-07 15:23:21.271897"]]
37627
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37628
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE (invitable_id IS NULL AND role = 'employer') AND (email = 'test@d-i.co')
37629
+  (0.1ms) rollback transaction
37630
+  (0.0ms) begin transaction
37631
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37632
+  (0.0ms) SAVEPOINT active_record_1
37633
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:21.274219"], ["updated_at", "2020-10-07 15:23:21.274219"]]
37634
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37635
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'employer') [["user_id", 1]]
37636
+  (0.0ms) SAVEPOINT active_record_1
37637
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "employer"], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.275725"], ["date_accepted", "2020-10-07 15:23:21.275555"], ["claim_hash", "33e4c701d9603515b68067c3f1b42e63adaa0f1a"], ["created_at", "2020-10-07 15:23:21.275702"], ["updated_at", "2020-10-07 15:23:21.275702"]]
37638
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37639
+  (0.1ms) rollback transaction
37640
+  (0.0ms) begin transaction
37641
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37642
+  (0.0ms) SAVEPOINT active_record_1
37643
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:21.277572"], ["updated_at", "2020-10-07 15:23:21.277572"]]
37644
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37645
+  (0.0ms) SAVEPOINT active_record_1
37646
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "employer"], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.278480"], ["claim_hash", "33e4c701d9603515b68067c3f1b42e63adaa0f1a"], ["created_at", "2020-10-07 15:23:21.278457"], ["updated_at", "2020-10-07 15:23:21.278457"]]
37647
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37648
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'employer') [["user_id", 1]]
37649
+  (0.1ms) rollback transaction
37650
+  (0.0ms) begin transaction
37651
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37652
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE (invitable_id IS NULL AND role = 'uberadmin') AND (email = 'test@d-i.co')
37653
+  (0.1ms) SAVEPOINT active_record_1
37654
+ Invitation Create (0.2ms) INSERT INTO "invitations" ("email", "role", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@d-i.co"], ["role", "uberadmin"], ["date_sent", "2020-10-07 15:23:21.281772"], ["claim_hash", "778f6c83b7f593eae8a35c6fa0fae3c4b6472da8"], ["created_at", "2020-10-07 15:23:21.281743"], ["updated_at", "2020-10-07 15:23:21.281743"]]
37655
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37656
+  (0.1ms) rollback transaction
37657
+  (0.1ms) begin transaction
37658
+ Invitation Load (0.1ms) SELECT "invitations".* FROM "invitations"
37659
+  (0.2ms) SAVEPOINT active_record_1
37660
+ Invitation Create (0.5ms) INSERT INTO "invitations" ("email", "role", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@d-i.co"], ["role", "uberadmin"], ["date_sent", "2020-10-07 15:23:21.285942"], ["claim_hash", "778f6c83b7f593eae8a35c6fa0fae3c4b6472da8"], ["created_at", "2020-10-07 15:23:21.285808"], ["updated_at", "2020-10-07 15:23:21.285808"]]
37661
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37662
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE (invitable_id IS NULL AND role = 'uberadmin') AND (email = 'test@d-i.co')
37663
+  (0.1ms) rollback transaction
37664
+  (0.0ms) begin transaction
37665
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37666
+  (0.0ms) SAVEPOINT active_record_1
37667
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:21.290620"], ["updated_at", "2020-10-07 15:23:21.290620"]]
37668
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37669
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
37670
+  (0.0ms) SAVEPOINT active_record_1
37671
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "date_accepted", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "uberadmin"], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.292145"], ["date_accepted", "2020-10-07 15:23:21.291967"], ["claim_hash", "33e4c701d9603515b68067c3f1b42e63adaa0f1a"], ["created_at", "2020-10-07 15:23:21.292119"], ["updated_at", "2020-10-07 15:23:21.292119"]]
37672
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37673
+  (0.1ms) rollback transaction
37674
+  (0.0ms) begin transaction
37675
+ Invitation Load (0.0ms) SELECT "invitations".* FROM "invitations"
37676
+  (0.0ms) SAVEPOINT active_record_1
37677
+ User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "test2@d-i.co"], ["created_at", "2020-10-07 15:23:21.294076"], ["updated_at", "2020-10-07 15:23:21.294076"]]
37678
+  (0.1ms) RELEASE SAVEPOINT active_record_1
37679
+  (0.1ms) SAVEPOINT active_record_1
37680
+ Invitation Create (0.1ms) INSERT INTO "invitations" ("email", "role", "user_id", "date_sent", "claim_hash", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "test2@d-i.co"], ["role", "uberadmin"], ["user_id", 1], ["date_sent", "2020-10-07 15:23:21.295214"], ["claim_hash", "33e4c701d9603515b68067c3f1b42e63adaa0f1a"], ["created_at", "2020-10-07 15:23:21.295187"], ["updated_at", "2020-10-07 15:23:21.295187"]]
37681
+  (0.1ms) RELEASE SAVEPOINT active_record_1
37682
+  (0.1ms) SELECT COUNT(*) FROM "invitations" WHERE "invitations"."user_id" = ? AND (invitable_id IS NULL AND role = 'uberadmin') [["user_id", 1]]
37683
+  (0.1ms) rollback transaction