spec/dummy/log/test.log in bookingsync-engine-4.0.1 vs spec/dummy/log/test.log in bookingsync-engine-4.0.2
- old
+ new
@@ -62521,5 +62521,1313 @@
[1m[35m (1.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mApplication Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1[0m [["LIMIT", 1]]
[1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
[1m[36mApplication Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1[0m [["LIMIT", 1]]
[1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.4ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (7.7ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "123"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "456"], ["LIMIT", 1]]
+ [1m[36mApplication Create (3.2ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:01.839588"], ["updated_at", "2019-07-17 03:48:01.839588"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (0.6ms)[0m [1m[34mSELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "example.test"], ["LIMIT", 1]]
+ [1m[35m (1.5ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[36mApplication Create (0.9ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:01.883912"], ["updated_at", "2019-07-17 03:48:01.883912"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (0.7ms)[0m [1m[34mSELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mApplication Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.7ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.6ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.5ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.5ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "DEF"], ["LIMIT", 1]]
+ [1m[35m (1.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[36mApplication Create (0.8ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:01.914804"], ["updated_at", "2019-07-17 03:48:01.914804"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (0.8ms)[0m [1m[34mSELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mApplication Exists (1.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.6ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.7ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.5ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.4ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "ABC"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.4ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[35m (1.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[36mApplication Create (1.4ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:01.950925"], ["updated_at", "2019-07-17 03:48:01.950925"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]]
+ [1m[35m (1.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (1.1ms)[0m [1m[34mSELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mApplication Exists (1.5ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.5ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "TEST.HOST"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[35m (1.0ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[36mApplication Create (1.0ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:01.990305"], ["updated_at", "2019-07-17 03:48:01.990305"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (1.4ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mApplication Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mApplication Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (1.0ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[36mApplication Create (1.2ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.016737"], ["updated_at", "2019-07-17 03:48:02.016737"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]]
+ [1m[35m (1.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mApplication Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mApplication Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.4ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[36mApplication Create (1.3ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.040757"], ["updated_at", "2019-07-17 03:48:02.040757"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]]
+ [1m[35m (0.9ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mApplication Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mApplication Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (1.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (1.0ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (5.6ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.host"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (2.3ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.109079"], ["updated_at", "2019-07-17 03:48:02.109079"], ["synced_id", 123], ["host", "example.host"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.7ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.114962"], ["updated_at", "2019-07-17 03:48:02.114962"], ["synced_id", 123], ["host", "test.host"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (0.8ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3[0m [["host", "test.host"], ["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (4.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (2.1ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.138267"], ["updated_at", "2019-07-17 03:48:02.138267"], ["synced_id", 123]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (1.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.7ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.154202"], ["updated_at", "2019-07-17 03:48:02.154202"], ["synced_id", 123], ["host", "test.example"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.example"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "123"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "456"], ["LIMIT", 1]]
+ [1m[36mApplication Create (0.7ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.160003"], ["updated_at", "2019-07-17 03:48:02.160003"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test2.example"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "234"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "567"], ["LIMIT", 1]]
+ [1m[36mApplication Create (0.7ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.165667"], ["updated_at", "2019-07-17 03:48:02.165667"], ["host", "test2.example"], ["client_id", "234"], ["client_secret", "567"]]
+ [1m[35m (0.5ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (0.6ms)[0m [1m[34mSELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.example"], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.173405"], ["updated_at", "2019-07-17 03:48:02.173405"], ["synced_id", 123], ["host", "test.example"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.example"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "123"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "456"], ["LIMIT", 1]]
+ [1m[36mApplication Create (1.3ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.180355"], ["updated_at", "2019-07-17 03:48:02.180355"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]]
+ [1m[35m (0.9ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (1.4ms)[0m [1m[34mSELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.example"], ["LIMIT", 1]]
+ [1m[35m (1.0ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.209736"], ["updated_at", "2019-07-17 03:48:02.209736"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.213847"], ["updated_at", "2019-07-17 03:48:02.213847"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.222019"], ["updated_at", "2019-07-17 03:48:02.222019"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.226070"], ["updated_at", "2019-07-17 03:48:02.226070"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (3.1ms)[0m [1m[34mSELECT COUNT(*) FROM "multi_applications_accounts"[0m
+ [1m[36mMultiApplicationsAccount Load (1.0ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 AND "multi_applications_accounts"."provider" = $3 LIMIT $4[0m [["host", "example3.test"], ["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "host") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.239212"], ["updated_at", "2019-07-17 03:48:02.239212"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["host", "example3.test"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.0ms)[0m [1m[34mSELECT COUNT(*) FROM "multi_applications_accounts"[0m
+ [1m[35m (0.9ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
+ [1m[36mMultiApplicationsAccount Load (0.9ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 AND "multi_applications_accounts"."provider" = $3 LIMIT $4[0m [["host", "example3.test"], ["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.0ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "host") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.249697"], ["updated_at", "2019-07-17 03:48:02.249697"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["host", "example3.test"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.254600"], ["updated_at", "2019-07-17 03:48:02.254600"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[36mMultiApplicationsAccount Load (0.7ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 AND "multi_applications_accounts"."provider" = $3 LIMIT $4[0m [["host", "example3.test"], ["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.7ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "host") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.263172"], ["updated_at", "2019-07-17 03:48:02.263172"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["host", "example3.test"]]
+ [1m[35m (0.5ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.7ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.266640"], ["updated_at", "2019-07-17 03:48:02.266640"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.5ms)[0m [1m[35mBEGIN[0m
+ [1m[36mMultiApplicationsAccount Load (0.8ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 AND "multi_applications_accounts"."provider" = $3 LIMIT $4[0m [["host", "example3.test"], ["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.5ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "host") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.274297"], ["updated_at", "2019-07-17 03:48:02.274297"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["host", "example3.test"]]
+ [1m[35m (0.5ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.0ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.277915"], ["updated_at", "2019-07-17 03:48:02.277915"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.289381"], ["updated_at", "2019-07-17 03:48:02.289381"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.293804"], ["updated_at", "2019-07-17 03:48:02.293804"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (0.9ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 AND "multi_applications_accounts"."provider" = $3 LIMIT $4[0m [["host", "example.test"], ["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."id" != $2 AND "multi_applications_accounts"."host" = $3 LIMIT $4[0m [["synced_id", 123], ["id", 2190], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Update (0.9ms)[0m [1m[33mUPDATE "multi_applications_accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "multi_applications_accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2019-07-17 03:48:02.299842"], ["id", 2190]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.1ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.307489"], ["updated_at", "2019-07-17 03:48:02.307489"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.0ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.312705"], ["updated_at", "2019-07-17 03:48:02.312705"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (0.9ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 AND "multi_applications_accounts"."provider" = $3 LIMIT $4[0m [["host", "example.test"], ["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."id" != $2 AND "multi_applications_accounts"."host" = $3 LIMIT $4[0m [["synced_id", 123], ["id", 2192], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Update (0.9ms)[0m [1m[33mUPDATE "multi_applications_accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "multi_applications_accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2019-07-17 03:48:02.319099"], ["id", 2192]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (0.8ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2[0m [["id", 2192], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.0ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.329820"], ["updated_at", "2019-07-17 03:48:02.329820"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.0ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.334758"], ["updated_at", "2019-07-17 03:48:02.334758"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (0.7ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 AND "multi_applications_accounts"."provider" = $3 LIMIT $4[0m [["host", "example.test"], ["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."id" != $2 AND "multi_applications_accounts"."host" = $3 LIMIT $4[0m [["synced_id", 123], ["id", 2194], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Update (1.0ms)[0m [1m[33mUPDATE "multi_applications_accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "multi_applications_accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2019-07-17 03:48:02.340815"], ["id", 2194]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (1.0ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2[0m [["id", 2194], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.0ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.350303"], ["updated_at", "2019-07-17 03:48:02.350303"], ["synced_id", 123], ["host", "test.example"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.example"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "123"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "456"], ["LIMIT", 1]]
+ [1m[36mApplication Create (1.0ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.356535"], ["updated_at", "2019-07-17 03:48:02.356535"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]]
+ [1m[35m (0.9ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (0.7ms)[0m [1m[34mSELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.example"], ["LIMIT", 1]]
+ [1m[35m (0.9ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2[0m [["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "host") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.365976"], ["updated_at", "2019-07-17 03:48:02.365976"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (1.1ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2[0m [["id", 2197], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."id" != $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["id", 2197], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Update (1.1ms)[0m [1m[33mUPDATE "multi_applications_accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "multi_applications_accounts"."id" = $5[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2019-07-17 03:48:02.374031"], ["id", 2197]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (0.9ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2[0m [["id", 2197], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.9ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.384182"], ["updated_at", "2019-07-17 03:48:02.384182"], ["synced_id", 1], ["host", "example.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.388476"], ["updated_at", "2019-07-17 03:48:02.388476"], ["synced_id", 2], ["host", "example.test"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.392501"], ["updated_at", "2019-07-17 03:48:02.392501"], ["synced_id", 1], ["host", "example2.test"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.0ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.397098"], ["updated_at", "2019-07-17 03:48:02.397098"], ["synced_id", 2], ["host", "example2.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (0.7ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3[0m [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "client_id"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "client_secret"], ["LIMIT", 1]]
+ [1m[36mApplication Create (0.9ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.407583"], ["updated_at", "2019-07-17 03:48:02.407583"], ["host", "host"], ["client_id", "client_id"], ["client_secret", "client_secret"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (2.3ms)[0m [1m[34mSELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "host"], ["LIMIT", 1]]
+ [1m[35m (1.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "host") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.437899"], ["updated_at", "2019-07-17 03:48:02.437899"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1563248882"], ["host", "example.test"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "123"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "456"], ["LIMIT", 1]]
+ [1m[36mApplication Create (0.8ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.443970"], ["updated_at", "2019-07-17 03:48:02.443970"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (0.9ms)[0m [1m[34mSELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "example.test"], ["LIMIT", 1]]
+ [1m[35m (2.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.5ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."id" != $2 AND "multi_applications_accounts"."host" = $3 LIMIT $4[0m [["synced_id", 123], ["id", 2202], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Update (1.3ms)[0m [1m[33mUPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "multi_applications_accounts"."id" = $4[0m [["updated_at", "2019-07-17 03:48:02.462146"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 2202]]
+ [1m[35m (1.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.4ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.9ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "host") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.472314"], ["updated_at", "2019-07-17 03:48:02.472314"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1563421682"], ["host", "example.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "123"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "456"], ["LIMIT", 1]]
+ [1m[36mApplication Create (0.9ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.479134"], ["updated_at", "2019-07-17 03:48:02.479134"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (0.6ms)[0m [1m[34mSELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "example.test"], ["LIMIT", 1]]
+ [1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2[0m [["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "host") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.487399"], ["updated_at", "2019-07-17 03:48:02.487399"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.1ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.495708"], ["updated_at", "2019-07-17 03:48:02.495708"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (0.7ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Load (0.8ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts"[0m
+ [1m[36mMultiApplicationsAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.tesu"], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (1.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.0ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/marc/Projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+ Rendered /Users/marc/Projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 7ms (Views: 3.8ms | ActiveRecord: 0.0ms)
+ [1m[35m (1.0ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/marc/Projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+ Rendered /Users/marc/Projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.9ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (1.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.1ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.552027"], ["updated_at", "2019-07-17 03:48:02.552027"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/admin
+Completed 302 Found in 10ms (ActiveRecord: 5.1ms)
+ [1m[35m (1.0ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (1.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.0ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.567729"], ["updated_at", "2019-07-17 03:48:02.567729"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 8ms (ActiveRecord: 4.7ms)
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.0ms)[0m [1m[34mSELECT COUNT(*) FROM "multi_applications_accounts"[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mMultiApplicationsAccount Load (1.0ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 AND "multi_applications_accounts"."provider" = $3 LIMIT $4[0m [["host", "test.host"], ["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (1.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.0ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "host") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.582224"], ["updated_at", "2019-07-17 03:48:02.582224"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["host", "test.host"]]
+ [1m[35m (0.9ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 8ms (ActiveRecord: 5.5ms)
+ [1m[35m (1.2ms)[0m [1m[34mSELECT COUNT(*) FROM "multi_applications_accounts"[0m
+ [1m[36mMultiApplicationsAccount Load (1.1ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Load (0.9ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (1.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.5ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (1.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.9ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.1ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.603315"], ["updated_at", "2019-07-17 03:48:02.603315"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 8ms (ActiveRecord: 5.1ms)
+ [1m[35m (1.0ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.9ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" DESC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (1.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 3ms (Views: 2.7ms | ActiveRecord: 0.0ms)
+ [1m[35m (1.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.9ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+ Rendering html template
+ Rendered html template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (1.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.650536"], ["updated_at", "2019-07-17 03:48:02.650536"], ["synced_id", 123]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.8ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (1.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Create (1.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.663717"], ["updated_at", "2019-07-17 03:48:02.663717"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Update (0.9ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", "2019-07-17 03:48:02.667733"], ["synced_id", 0], ["id", 1990]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (1.0ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mAccount Create (1.1ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.680145"], ["updated_at", "2019-07-17 03:48:02.680145"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.8ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 1991], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND "accounts"."id" != $1 LIMIT $2[0m [["id", 1991], ["LIMIT", 1]]
+ [1m[36mAccount Update (0.9ms)[0m [1m[33mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2019-07-17 03:48:02.687575"], ["id", 1991]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.9ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 1991], ["LIMIT", 1]]
+ [1m[35m (0.9ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 1], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.0ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.698221"], ["updated_at", "2019-07-17 03:48:02.698221"], ["synced_id", 1]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 2], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.1ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.702971"], ["updated_at", "2019-07-17 03:48:02.702971"], ["synced_id", 2]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 3], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.0ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.707408"], ["updated_at", "2019-07-17 03:48:02.707408"], ["synced_id", 3]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.8ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 3], ["LIMIT", 1]]
+ [1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.715743"], ["updated_at", "2019-07-17 03:48:02.715743"], ["synced_id", 123]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.723076"], ["updated_at", "2019-07-17 03:48:02.723076"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.8ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.729623"], ["updated_at", "2019-07-17 03:48:02.729623"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.5ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.736663"], ["updated_at", "2019-07-17 03:48:02.736663"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.7ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.0ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.741456"], ["updated_at", "2019-07-17 03:48:02.741456"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.9ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.749882"], ["updated_at", "2019-07-17 03:48:02.749882"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.7ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.755147"], ["updated_at", "2019-07-17 03:48:02.755147"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.0ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.762731"], ["updated_at", "2019-07-17 03:48:02.762731"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.6ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.768429"], ["updated_at", "2019-07-17 03:48:02.768429"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.9ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.775561"], ["updated_at", "2019-07-17 03:48:02.775561"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.9ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.780478"], ["updated_at", "2019-07-17 03:48:02.780478"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.7ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3[0m [["synced_id", 123], ["id", 2005], ["LIMIT", 1]]
+ [1m[36mAccount Update (0.9ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2019-07-17 03:48:02.785923"], ["id", 2005]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.7ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 2005], ["LIMIT", 1]]
+ [1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.1ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.794438"], ["updated_at", "2019-07-17 03:48:02.794438"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.799345"], ["updated_at", "2019-07-17 03:48:02.799345"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.6ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.5ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3[0m [["synced_id", 123], ["id", 2007], ["LIMIT", 1]]
+ [1m[36mAccount Update (0.8ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2019-07-17 03:48:02.804445"], ["id", 2007]]
+ [1m[35m (0.5ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.7ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 2007], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.813393"], ["updated_at", "2019-07-17 03:48:02.813393"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (1.4ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.819665"], ["updated_at", "2019-07-17 03:48:02.819665"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.9ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (1.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.9ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3[0m [["synced_id", 123], ["id", 2009], ["LIMIT", 1]]
+ [1m[36mAccount Update (1.0ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2019-07-17 03:48:02.826815"], ["id", 2009]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.0ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.834968"], ["updated_at", "2019-07-17 03:48:02.834968"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.839530"], ["updated_at", "2019-07-17 03:48:02.839530"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.7ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3[0m [["synced_id", 123], ["id", 2011], ["LIMIT", 1]]
+ [1m[36mAccount Update (1.0ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2019-07-17 03:48:02.844975"], ["id", 2011]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mAccount Create (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.852037"], ["updated_at", "2019-07-17 03:48:02.852037"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.858781"], ["updated_at", "2019-07-17 03:48:02.858781"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1563248882"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3[0m [["synced_id", 123], ["id", 2013], ["LIMIT", 1]]
+ [1m[36mAccount Update (0.9ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4[0m [["updated_at", "2019-07-17 03:48:02.875117"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 2013]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.882607"], ["updated_at", "2019-07-17 03:48:02.882607"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1563421682"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2019-07-17 03:48:02.892491"], ["updated_at", "2019-07-17 03:48:02.892491"], ["synced_id", 123]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.0ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.0ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.5ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.9ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.6ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.host"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.4ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.450982"], ["updated_at", "2019-07-17 03:58:16.450982"], ["synced_id", 123], ["host", "example.host"]]
+ [1m[35m (0.9ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.9ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.457318"], ["updated_at", "2019-07-17 03:58:16.457318"], ["synced_id", 123], ["host", "test.host"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (0.9ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3[0m [["host", "test.host"], ["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (1.0ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (2.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.486197"], ["updated_at", "2019-07-17 03:58:16.486197"], ["synced_id", 123]]
+ [1m[35m (1.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (1.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (2.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (1.0ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (2.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (1.4ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[36mApplication Create (1.0ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.533891"], ["updated_at", "2019-07-17 03:58:16.533891"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]]
+ [1m[35m (0.9ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (1.4ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mApplication Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mApplication Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (1.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[36mApplication Create (1.0ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.564207"], ["updated_at", "2019-07-17 03:58:16.564207"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]]
+ [1m[35m (1.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (1.0ms)[0m [1m[34mSELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mApplication Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.4ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.5ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "ABC"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[35m (1.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[36mApplication Create (1.2ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.602734"], ["updated_at", "2019-07-17 03:58:16.602734"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]]
+ [1m[35m (0.9ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mApplication Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mApplication Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (1.0ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[36mApplication Create (1.0ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.624636"], ["updated_at", "2019-07-17 03:58:16.624636"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mApplication Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mApplication Exists (1.6ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (1.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (1.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (1.7ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (2.4ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (2.2ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[36mApplication Create (1.6ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.664019"], ["updated_at", "2019-07-17 03:58:16.664019"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]]
+ [1m[35m (1.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (1.3ms)[0m [1m[34mSELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mApplication Exists (1.4ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.5ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "TEST.HOST"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[35m (1.4ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (1.3ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.4ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (1.7ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.4ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[36mApplication Create (1.4ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.702264"], ["updated_at", "2019-07-17 03:58:16.702264"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]]
+ [1m[35m (1.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (1.2ms)[0m [1m[34mSELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mApplication Exists (1.4ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "def"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.7ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "abc"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "DEF"], ["LIMIT", 1]]
+ [1m[35m (0.9ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (1.0ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.9ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (1.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.736665"], ["updated_at", "2019-07-17 03:58:16.736665"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (1.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 11ms (ActiveRecord: 5.9ms)
+ [1m[35m (1.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (1.0ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (1.8ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (1.5ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.755306"], ["updated_at", "2019-07-17 03:58:16.755306"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (1.4ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/admin
+Completed 302 Found in 12ms (ActiveRecord: 7.8ms)
+ [1m[35m (1.5ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (1.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.4ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (1.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.0ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.778107"], ["updated_at", "2019-07-17 03:58:16.778107"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.9ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 7ms (ActiveRecord: 5.0ms)
+ [1m[35m (1.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (1.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" DESC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (1.0ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.1ms)[0m [1m[34mSELECT COUNT(*) FROM "multi_applications_accounts"[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mMultiApplicationsAccount Load (1.0ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 AND "multi_applications_accounts"."provider" = $3 LIMIT $4[0m [["host", "test.host"], ["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.4ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "host") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.796965"], ["updated_at", "2019-07-17 03:58:16.796965"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["host", "test.host"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 9ms (ActiveRecord: 4.9ms)
+ [1m[35m (0.8ms)[0m [1m[34mSELECT COUNT(*) FROM "multi_applications_accounts"[0m
+ [1m[36mMultiApplicationsAccount Load (1.0ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Load (0.8ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/marc/Projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+ Rendered /Users/marc/Projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 6ms (Views: 3.0ms | ActiveRecord: 0.0ms)
+ [1m[35m (1.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/marc/Projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+ Rendered /Users/marc/Projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "123"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "456"], ["LIMIT", 1]]
+ [1m[36mApplication Create (0.8ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.840878"], ["updated_at", "2019-07-17 03:58:16.840878"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (0.8ms)[0m [1m[34mSELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "example.test"], ["LIMIT", 1]]
+ [1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.0ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+ Rendering html template
+ Rendered html template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mAccount Create (1.1ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.883448"], ["updated_at", "2019-07-17 03:58:16.883448"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (1.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 2020], ["LIMIT", 1]]
+ [1m[35m (0.5ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND "accounts"."id" != $1 LIMIT $2[0m [["id", 2020], ["LIMIT", 1]]
+ [1m[36mAccount Update (0.9ms)[0m [1m[33mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2019-07-17 03:58:16.893249"], ["id", 2020]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.7ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 2020], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.9ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.901900"], ["updated_at", "2019-07-17 03:58:16.901900"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.905981"], ["updated_at", "2019-07-17 03:58:16.905981"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.7ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3[0m [["synced_id", 123], ["id", 2022], ["LIMIT", 1]]
+ [1m[36mAccount Update (0.7ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2019-07-17 03:58:16.911186"], ["id", 2022]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.9ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.919258"], ["updated_at", "2019-07-17 03:58:16.919258"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.923456"], ["updated_at", "2019-07-17 03:58:16.923456"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.7ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3[0m [["synced_id", 123], ["id", 2024], ["LIMIT", 1]]
+ [1m[36mAccount Update (0.8ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2019-07-17 03:58:16.928663"], ["id", 2024]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (1.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 2024], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.937971"], ["updated_at", "2019-07-17 03:58:16.937971"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.942073"], ["updated_at", "2019-07-17 03:58:16.942073"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.8ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3[0m [["synced_id", 123], ["id", 2026], ["LIMIT", 1]]
+ [1m[36mAccount Update (1.5ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2019-07-17 03:58:16.947740"], ["id", 2026]]
+ [1m[35m (0.9ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (1.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 2026], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.5ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.9ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.957934"], ["updated_at", "2019-07-17 03:58:16.957934"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.962113"], ["updated_at", "2019-07-17 03:58:16.962113"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (1.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (1.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3[0m [["synced_id", 123], ["id", 2028], ["LIMIT", 1]]
+ [1m[36mAccount Update (0.9ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2019-07-17 03:58:16.968762"], ["id", 2028]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.977279"], ["updated_at", "2019-07-17 03:58:16.977279"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.4ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (1.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.985252"], ["updated_at", "2019-07-17 03:58:16.985252"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:16.994678"], ["updated_at", "2019-07-17 03:58:16.994678"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (1.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.9ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.000585"], ["updated_at", "2019-07-17 03:58:17.000585"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (1.4ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (2.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.012464"], ["updated_at", "2019-07-17 03:58:17.012464"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (2.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (1.6ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (1.5ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (2.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.025083"], ["updated_at", "2019-07-17 03:58:17.025083"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (1.4ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.5ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (3.0ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.042061"], ["updated_at", "2019-07-17 03:58:17.042061"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (2.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (5.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (4.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (3.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (2.0ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.063635"], ["updated_at", "2019-07-17 03:58:17.063635"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (1.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (1.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (1.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.076538"], ["updated_at", "2019-07-17 03:58:17.076538"], ["synced_id", 123]]
+ [1m[35m (0.9ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.5ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (1.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.112292"], ["updated_at", "2019-07-17 03:58:17.112292"], ["synced_id", 123]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.0ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.5ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.119889"], ["updated_at", "2019-07-17 03:58:17.119889"], ["synced_id", 123]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.143914"], ["updated_at", "2019-07-17 03:58:17.143914"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1563249497"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3[0m [["synced_id", 123], ["id", 2040], ["LIMIT", 1]]
+ [1m[36mAccount Update (1.2ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4[0m [["updated_at", "2019-07-17 03:58:17.161206"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 2040]]
+ [1m[35m (1.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.9ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.169907"], ["updated_at", "2019-07-17 03:58:17.169907"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1563422297"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 1], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.176994"], ["updated_at", "2019-07-17 03:58:17.176994"], ["synced_id", 1]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 2], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.9ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.180662"], ["updated_at", "2019-07-17 03:58:17.180662"], ["synced_id", 2]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 3], ["LIMIT", 1]]
+ [1m[36mAccount Create (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.184688"], ["updated_at", "2019-07-17 03:58:17.184688"], ["synced_id", 3]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (1.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 3], ["LIMIT", 1]]
+ [1m[35m (1.0ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.9ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mAccount Create (1.0ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.193986"], ["updated_at", "2019-07-17 03:58:17.193986"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.9ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (1.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Create (1.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.208690"], ["updated_at", "2019-07-17 03:58:17.208690"]]
+ [1m[35m (1.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Update (1.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", "2019-07-17 03:58:17.213782"], ["synced_id", 0], ["id", 2046]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.9ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.4ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.2ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.226735"], ["updated_at", "2019-07-17 03:58:17.226735"], ["synced_id", 123], ["host", "test.example"]]
+ [1m[35m (0.9ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (1.5ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.example"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "123"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "456"], ["LIMIT", 1]]
+ [1m[36mApplication Create (1.2ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.236822"], ["updated_at", "2019-07-17 03:58:17.236822"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]]
+ [1m[35m (0.9ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (1.2ms)[0m [1m[34mSELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.example"], ["LIMIT", 1]]
+ [1m[35m (1.0ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.4ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.5ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.258792"], ["updated_at", "2019-07-17 03:58:17.258792"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]]
+ [1m[35m (0.9ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (1.0ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Load (0.8ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts"[0m
+ [1m[36mMultiApplicationsAccount Exists (1.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.tesu"], ["LIMIT", 1]]
+ [1m[35m (1.5ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (1.3ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (2.7ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (2.9ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.284022"], ["updated_at", "2019-07-17 03:58:17.284022"], ["synced_id", 123], ["host", "test.example"]]
+ [1m[35m (1.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.example"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "123"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "456"], ["LIMIT", 1]]
+ [1m[36mApplication Create (0.9ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.295122"], ["updated_at", "2019-07-17 03:58:17.295122"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (0.9ms)[0m [1m[34mSELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.example"], ["LIMIT", 1]]
+ [1m[35m (0.9ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.9ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.304514"], ["updated_at", "2019-07-17 03:58:17.304514"], ["synced_id", 123], ["host", "test.example"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.example"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "123"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "456"], ["LIMIT", 1]]
+ [1m[36mApplication Create (0.8ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.310880"], ["updated_at", "2019-07-17 03:58:17.310880"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test2.example"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "234"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "567"], ["LIMIT", 1]]
+ [1m[36mApplication Create (0.7ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.317170"], ["updated_at", "2019-07-17 03:58:17.317170"], ["host", "test2.example"], ["client_id", "234"], ["client_secret", "567"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (0.8ms)[0m [1m[34mSELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "test.example"], ["LIMIT", 1]]
+ [1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2[0m [["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.2ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "host") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.325259"], ["updated_at", "2019-07-17 03:58:17.325259"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (0.7ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2[0m [["id", 2214], ["LIMIT", 1]]
+ [1m[35m (1.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."id" != $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["id", 2214], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Update (0.8ms)[0m [1m[33mUPDATE "multi_applications_accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "multi_applications_accounts"."id" = $5[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2019-07-17 03:58:17.333219"], ["id", 2214]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (1.0ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2[0m [["id", 2214], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "host"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "client_id"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "client_secret"], ["LIMIT", 1]]
+ [1m[36mApplication Create (0.8ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.344687"], ["updated_at", "2019-07-17 03:58:17.344687"], ["host", "host"], ["client_id", "client_id"], ["client_secret", "client_secret"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (1.1ms)[0m [1m[34mSELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "host"], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.354317"], ["updated_at", "2019-07-17 03:58:17.354317"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.0ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.358881"], ["updated_at", "2019-07-17 03:58:17.358881"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.4ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.9ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.0ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.371846"], ["updated_at", "2019-07-17 03:58:17.371846"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.376685"], ["updated_at", "2019-07-17 03:58:17.376685"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (0.9ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 AND "multi_applications_accounts"."provider" = $3 LIMIT $4[0m [["host", "example.test"], ["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (1.4ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.4ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."id" != $2 AND "multi_applications_accounts"."host" = $3 LIMIT $4[0m [["synced_id", 123], ["id", 2217], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Update (1.4ms)[0m [1m[33mUPDATE "multi_applications_accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "multi_applications_accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2019-07-17 03:58:17.384323"], ["id", 2217]]
+ [1m[35m (1.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.9ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.394307"], ["updated_at", "2019-07-17 03:58:17.394307"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.9ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.399919"], ["updated_at", "2019-07-17 03:58:17.399919"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (1.0ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 AND "multi_applications_accounts"."provider" = $3 LIMIT $4[0m [["host", "example.test"], ["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."id" != $2 AND "multi_applications_accounts"."host" = $3 LIMIT $4[0m [["synced_id", 123], ["id", 2219], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Update (0.9ms)[0m [1m[33mUPDATE "multi_applications_accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "multi_applications_accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2019-07-17 03:58:17.406374"], ["id", 2219]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (0.9ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2[0m [["id", 2219], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (1.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.9ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.416417"], ["updated_at", "2019-07-17 03:58:17.416417"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.9ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.421190"], ["updated_at", "2019-07-17 03:58:17.421190"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (1.0ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 AND "multi_applications_accounts"."provider" = $3 LIMIT $4[0m [["host", "example.test"], ["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."id" != $2 AND "multi_applications_accounts"."host" = $3 LIMIT $4[0m [["synced_id", 123], ["id", 2221], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Update (0.9ms)[0m [1m[33mUPDATE "multi_applications_accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "multi_applications_accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2019-07-17 03:58:17.427756"], ["id", 2221]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (0.8ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2[0m [["id", 2221], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.9ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.436654"], ["updated_at", "2019-07-17 03:58:17.436654"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]]
+ [1m[35m (1.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.441090"], ["updated_at", "2019-07-17 03:58:17.441090"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[34mSELECT COUNT(*) FROM "multi_applications_accounts"[0m
+ [1m[36mMultiApplicationsAccount Load (0.8ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 AND "multi_applications_accounts"."provider" = $3 LIMIT $4[0m [["host", "example3.test"], ["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.9ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "host") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.447425"], ["updated_at", "2019-07-17 03:58:17.447425"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["host", "example3.test"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[34mSELECT COUNT(*) FROM "multi_applications_accounts"[0m
+ [1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[36mMultiApplicationsAccount Load (0.9ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 AND "multi_applications_accounts"."provider" = $3 LIMIT $4[0m [["host", "example3.test"], ["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.0ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "host") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.457312"], ["updated_at", "2019-07-17 03:58:17.457312"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["host", "example3.test"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.9ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.462363"], ["updated_at", "2019-07-17 03:58:17.462363"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]]
+ [1m[35m (0.9ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[36mMultiApplicationsAccount Load (0.7ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 AND "multi_applications_accounts"."provider" = $3 LIMIT $4[0m [["host", "example3.test"], ["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.9ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "host") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.471672"], ["updated_at", "2019-07-17 03:58:17.471672"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["host", "example3.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.476051"], ["updated_at", "2019-07-17 03:58:17.476051"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
+ [1m[36mMultiApplicationsAccount Load (0.8ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 AND "multi_applications_accounts"."provider" = $3 LIMIT $4[0m [["host", "example3.test"], ["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.9ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "host") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.484841"], ["updated_at", "2019-07-17 03:58:17.484841"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["host", "example3.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.489188"], ["updated_at", "2019-07-17 03:58:17.489188"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (1.0ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.497095"], ["updated_at", "2019-07-17 03:58:17.497095"], ["synced_id", 1], ["host", "example.test"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.501551"], ["updated_at", "2019-07-17 03:58:17.501551"], ["synced_id", 2], ["host", "example.test"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.505753"], ["updated_at", "2019-07-17 03:58:17.505753"], ["synced_id", 1], ["host", "example2.test"]]
+ [1m[35m (0.5ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.9ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.509742"], ["updated_at", "2019-07-17 03:58:17.509742"], ["synced_id", 2], ["host", "example2.test"]]
+ [1m[35m (0.8ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Load (0.8ms)[0m [1m[34mSELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3[0m [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2[0m [["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "host") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.518521"], ["updated_at", "2019-07-17 03:58:17.518521"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.9ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "host") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.525716"], ["updated_at", "2019-07-17 03:58:17.525716"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1563422297"], ["host", "example.test"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "123"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "456"], ["LIMIT", 1]]
+ [1m[36mApplication Create (0.8ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.532091"], ["updated_at", "2019-07-17 03:58:17.532091"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (0.7ms)[0m [1m[34mSELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "example.test"], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.5ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3[0m [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Create (0.8ms)[0m [1m[32mINSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "host") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.540193"], ["updated_at", "2019-07-17 03:58:17.540193"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1563249497"], ["host", "example.test"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mApplication Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2[0m [["client_id", "123"], ["LIMIT", 1]]
+ [1m[36mApplication Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2[0m [["client_secret", "456"], ["LIMIT", 1]]
+ [1m[36mApplication Create (0.8ms)[0m [1m[32mINSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2019-07-17 03:58:17.546609"], ["updated_at", "2019-07-17 03:58:17.546609"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]]
+ [1m[35m (0.9ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mApplication Load (0.8ms)[0m [1m[34mSELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2[0m [["host", "example.test"], ["LIMIT", 1]]
+ [1m[35m (1.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mMultiApplicationsAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."id" != $2 AND "multi_applications_accounts"."host" = $3 LIMIT $4[0m [["synced_id", 123], ["id", 2238], ["host", "example.test"], ["LIMIT", 1]]
+ [1m[36mMultiApplicationsAccount Update (1.0ms)[0m [1m[33mUPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "multi_applications_accounts"."id" = $4[0m [["updated_at", "2019-07-17 03:58:17.564031"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 2238]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m