(0.8ms) CREATE DATABASE "bookingsync_engine_test" ENCODING = 'unicode' SQL (15.4ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"  (23.3ms) DROP TABLE IF EXISTS "accounts" CASCADE  (28.6ms) CREATE TABLE "accounts" ("id" bigserial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "provider" character varying, "synced_id" integer, "name" character varying, "oauth_access_token" character varying, "oauth_refresh_token" character varying, "oauth_expires_at" character varying, "customized_key" integer)  (1.7ms) CREATE INDEX "index_accounts_on_synced_id" ON "accounts" ("synced_id")  (0.1ms) DROP TABLE IF EXISTS "applications" CASCADE  (4.2ms) CREATE TABLE "applications" ("id" bigserial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "host" character varying NOT NULL, "client_id" text NOT NULL, "client_secret" text NOT NULL)  (1.6ms) CREATE UNIQUE INDEX "index_applications_on_client_id" ON "applications" ("client_id")  (1.4ms) CREATE UNIQUE INDEX "index_applications_on_client_secret" ON "applications" ("client_secret")  (1.4ms) CREATE UNIQUE INDEX "index_applications_on_host" ON "applications" ("host")  (0.1ms) DROP TABLE IF EXISTS "multi_applications_accounts" CASCADE  (4.9ms) CREATE TABLE "multi_applications_accounts" ("id" bigserial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "provider" character varying, "synced_id" integer, "name" character varying, "oauth_access_token" character varying, "oauth_refresh_token" character varying, "oauth_expires_at" character varying, "host" character varying NOT NULL, "customized_key" integer)  (1.6ms) CREATE UNIQUE INDEX "index_multi_applications_accounts_on_host_and_synced_id" ON "multi_applications_accounts" ("host", "synced_id")  (1.3ms) CREATE INDEX "index_multi_applications_accounts_on_host" ON "multi_applications_accounts" ("host")  (1.4ms) CREATE INDEX "index_multi_applications_accounts_on_synced_id" ON "multi_applications_accounts" ("synced_id")  (3.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (5.7ms) INSERT INTO "schema_migrations" (version) VALUES (20190623220132)  (6.3ms) INSERT INTO "schema_migrations" (version) VALUES (20140522110326), (20140522110454), (20181130062531), (20181130062650), (20181130063056), (20181130063104), (20190623220013);   (6.6ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) ActiveRecord::InternalMetadata Load (1.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]] TRANSACTION (0.1ms) BEGIN ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "test"], ["created_at", "2021-01-22 07:28:28.184143"], ["updated_at", "2021-01-22 07:28:28.184143"]] TRANSACTION (6.2ms) COMMIT ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]] ActiveRecord::InternalMetadata Load (0.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "schema_sha1"], ["LIMIT", 1]] TRANSACTION (0.1ms) BEGIN ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "schema_sha1"], ["value", "bbd2203b7b772caf90e278286cb3165377fea546"], ["created_at", "2021-01-22 07:28:28.197333"], ["updated_at", "2021-01-22 07:28:28.197333"]] TRANSACTION (6.2ms) COMMIT  (2.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 1.4ms | Allocations: 270) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 1.6ms | Allocations: 363) Completed 200 OK in 25ms (Views: 7.8ms | ActiveRecord: 0.0ms | Allocations: 4122) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 0.1ms | Allocations: 53) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 0.3ms | Allocations: 139) Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms | Allocations: 436) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 162) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/signed_out Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 117) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (14.4ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.7ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.057501"], ["updated_at", "2021-01-22 07:28:37.057501"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/admin Completed 302 Found in 143ms (ActiveRecord: 107.0ms | Allocations: 10540) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.063841"], ["updated_at", "2021-01-22 07:28:37.063841"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.9ms | Allocations: 868) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (26.4ms) SELECT COUNT(*) FROM "multi_applications_accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "test.host"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.6ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.111189"], ["updated_at", "2021-01-22 07:28:37.111189"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 12ms (ActiveRecord: 2.9ms | Allocations: 6042)  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.3ms) BEGIN  (0.2ms) SELECT COUNT(*) FROM "accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.122989"], ["updated_at", "2021-01-22 07:28:37.122989"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 4ms (ActiveRecord: 1.0ms | Allocations: 873)  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (15.6ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.5ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.6ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.152474"], ["updated_at", "2021-01-22 07:28:37.152474"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.170410"], ["updated_at", "2021-01-22 07:28:37.170410"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.179118"], ["updated_at", "2021-01-22 07:28:37.179118"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "DEF"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.189888"], ["updated_at", "2021-01-22 07:28:37.189888"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.198238"], ["updated_at", "2021-01-22 07:28:37.198238"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "ABC"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.208415"], ["updated_at", "2021-01-22 07:28:37.208415"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "TEST.HOST"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.218570"], ["updated_at", "2021-01-22 07:28:37.218570"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.220650"], ["updated_at", "2021-01-22 07:28:37.220650"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.223685"], ["updated_at", "2021-01-22 07:28:37.223685"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.228158"], ["updated_at", "2021-01-22 07:28:37.228158"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.230035"], ["updated_at", "2021-01-22 07:28:37.230035"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.4ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.233801"], ["updated_at", "2021-01-22 07:28:37.233801"], ["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"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.4ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.237157"], ["updated_at", "2021-01-22 07:28:37.237157"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.241090"], ["updated_at", "2021-01-22 07:28:37.241090"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.243134"], ["updated_at", "2021-01-22 07:28:37.243134"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.246277"], ["updated_at", "2021-01-22 07:28:37.246277"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.248009"], ["updated_at", "2021-01-22 07:28:37.248009"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (2.3ms) SELECT 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 [["synced_id", 123], ["id", 11], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.4ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-01-22 07:28:37.252765"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 11]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.256953"], ["updated_at", "2021-01-22 07:28:37.256953"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.258935"], ["updated_at", "2021-01-22 07:28:37.258935"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 13], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-01-22 07:28:37.261863"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 13]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 13], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.265454"], ["updated_at", "2021-01-22 07:28:37.265454"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.267449"], ["updated_at", "2021-01-22 07:28:37.267449"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["synced_id", 123], ["id", 15], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-01-22 07:28:37.270825"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 15]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 15], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.274803"], ["updated_at", "2021-01-22 07:28:37.274803"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.276755"], ["updated_at", "2021-01-22 07:28:37.276755"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.4ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.283540"], ["updated_at", "2021-01-22 07:28:37.283540"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.292140"], ["updated_at", "2021-01-22 07:28:37.292140"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1611214117"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.295276"], ["updated_at", "2021-01-22 07:28:37.295276"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["synced_id", 123], ["id", 20], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "multi_applications_accounts"."id" = $4 [["updated_at", "2021-01-22 07:28:37.320801"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 20]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.326676"], ["updated_at", "2021-01-22 07:28:37.326676"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1611386917"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.330268"], ["updated_at", "2021-01-22 07:28:37.330268"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.333960"], ["updated_at", "2021-01-22 07:28:37.333960"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 22], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["id", 22], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "multi_applications_accounts"."id" = $5 [["updated_at", "2021-01-22 07:28:37.336915"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 22]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 22], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.340418"], ["updated_at", "2021-01-22 07:28:37.340418"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.343347"], ["updated_at", "2021-01-22 07:28:37.343347"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.359897"], ["updated_at", "2021-01-22 07:28:37.359897"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.362724"], ["updated_at", "2021-01-22 07:28:37.362724"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test2.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "234"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "567"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.365374"], ["updated_at", "2021-01-22 07:28:37.365374"], ["host", "test2.example"], ["client_id", "234"], ["client_secret", "567"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.369146"], ["updated_at", "2021-01-22 07:28:37.369146"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.tesu"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.377666"], ["updated_at", "2021-01-22 07:28:37.377666"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.379690"], ["updated_at", "2021-01-22 07:28:37.379690"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.381397"], ["updated_at", "2021-01-22 07:28:37.381397"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.383070"], ["updated_at", "2021-01-22 07:28:37.383070"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.388306"], ["updated_at", "2021-01-22 07:28:37.388306"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.390133"], ["updated_at", "2021-01-22 07:28:37.390133"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.391855"], ["updated_at", "2021-01-22 07:28:37.391855"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.393611"], ["updated_at", "2021-01-22 07:28:37.393611"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.397388"], ["updated_at", "2021-01-22 07:28:37.397388"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.400273"], ["updated_at", "2021-01-22 07:28:37.400273"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.3ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "client_id"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "client_secret"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.405893"], ["updated_at", "2021-01-22 07:28:37.405893"], ["host", "host"], ["client_id", "client_id"], ["client_secret", "client_secret"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.5ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.437409"], ["updated_at", "2021-01-22 07:28:37.437409"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND "accounts"."id" != $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5 [["updated_at", "2021-01-22 07:28:37.440518"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 4]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.443984"], ["updated_at", "2021-01-22 07:28:37.443984"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1611386917"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.446820"], ["updated_at", "2021-01-22 07:28:37.446820"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1611214117"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 6], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-01-22 07:28:37.461876"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 6]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.464807"], ["updated_at", "2021-01-22 07:28:37.464807"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1611214117"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.4ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.468997"], ["updated_at", "2021-01-22 07:28:37.468997"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1611214117"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 8], ["LIMIT", 1]] Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-01-22 07:28:37.483924"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 8]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.488197"], ["updated_at", "2021-01-22 07:28:37.488197"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.491290"], ["updated_at", "2021-01-22 07:28:37.491290"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.494485"], ["updated_at", "2021-01-22 07:28:37.494485"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.496728"], ["updated_at", "2021-01-22 07:28:37.496728"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.499327"], ["updated_at", "2021-01-22 07:28:37.499327"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.4ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.502840"], ["updated_at", "2021-01-22 07:28:37.502840"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.506252"], ["updated_at", "2021-01-22 07:28:37.506252"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-01-22 07:28:37.508426"], ["updated_at", "2021-01-22 07:28:37.508426"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.511344"], ["updated_at", "2021-01-22 07:28:37.511344"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.513086"], ["updated_at", "2021-01-22 07:28:37.513086"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 18], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-01-22 07:28:37.515447"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 18]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.4ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.518927"], ["updated_at", "2021-01-22 07:28:37.518927"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.521287"], ["updated_at", "2021-01-22 07:28:37.521287"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 20], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-01-22 07:28:37.546973"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 20]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.549999"], ["updated_at", "2021-01-22 07:28:37.549999"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.551686"], ["updated_at", "2021-01-22 07:28:37.551686"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 22], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-01-22 07:28:37.554755"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 22]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 22], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.558256"], ["updated_at", "2021-01-22 07:28:37.558256"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.560001"], ["updated_at", "2021-01-22 07:28:37.560001"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 24], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-01-22 07:28:37.562462"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 24]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 24], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2021-01-22 07:28:37.565721"], ["updated_at", "2021-01-22 07:28:37.565721"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3 [["updated_at", "2021-01-22 07:28:37.566872"], ["synced_id", 0], ["id", 25]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 0], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-01-22 07:28:37.572333"], ["updated_at", "2021-01-22 07:28:37.572333"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-01-22 07:28:37.573959"], ["updated_at", "2021-01-22 07:28:37.573959"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-01-22 07:28:37.575456"], ["updated_at", "2021-01-22 07:28:37.575456"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-01-22 07:28:37.580416"], ["updated_at", "2021-01-22 07:28:37.580416"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-01-22 07:28:37.582966"], ["updated_at", "2021-01-22 07:28:37.582966"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-01-22 07:28:37.597971"], ["updated_at", "2021-01-22 07:28:37.597971"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-01-22 07:28:37.613042"], ["updated_at", "2021-01-22 07:28:37.613042"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-01-22 07:28:37.616379"], ["updated_at", "2021-01-22 07:28:37.616379"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-01-22 07:28:37.619876"], ["updated_at", "2021-01-22 07:28:37.619876"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-01-22 07:28:37.621540"], ["updated_at", "2021-01-22 07:28:37.621540"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-01-22 07:28:37.622990"], ["updated_at", "2021-01-22 07:28:37.622990"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.626281"], ["updated_at", "2021-01-22 07:28:37.626281"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.5ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.653344"], ["updated_at", "2021-01-22 07:28:37.653344"], ["synced_id", 123], ["host", "example.host"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-01-22 07:28:37.656296"], ["updated_at", "2021-01-22 07:28:37.656296"], ["synced_id", 123], ["host", "test.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "test.host"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-01-22 07:28:37.663424"], ["updated_at", "2021-01-22 07:28:37.663424"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 1) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 5ms (Views: 5.1ms | ActiveRecord: 0.0ms | Allocations: 507) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 1) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 176) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN 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 | Allocations: 93) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 3) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.0ms | Allocations: 331) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-01-22 07:28:37.690554"], ["updated_at", "2021-01-22 07:28:37.690554"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.1ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (6.5ms) SAVEPOINT active_record_1 Application Exists? (30.8ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (2.9ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (5.6ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (20.7ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:50.774715"], ["updated_at", "2021-02-15 06:49:50.774715"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.4ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.4ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:50.966135"], ["updated_at", "2021-02-15 06:49:50.966135"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.5ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.4ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "ABC"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.4ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.4ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:50.987289"], ["updated_at", "2021-02-15 06:49:50.987289"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:50.993787"], ["updated_at", "2021-02-15 06:49:50.993787"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.4ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "TEST.HOST"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (1.5ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.004105"], ["updated_at", "2021-02-15 06:49:51.004105"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "DEF"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Application Exists? (0.5ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.016706"], ["updated_at", "2021-02-15 06:49:51.016706"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 3.8ms | Allocations: 269) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 4.1ms | Allocations: 362) Completed 200 OK in 66ms (Views: 23.0ms | ActiveRecord: 0.0ms | Allocations: 4118) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 0.2ms | Allocations: 53) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 0.4ms | Allocations: 139) Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms | Allocations: 436) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (23.6ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (1.9ms) INSERT 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" [["created_at", "2021-02-15 06:49:51.283617"], ["updated_at", "2021-02-15 06:49:51.283617"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 41ms (ActiveRecord: 29.5ms | Allocations: 6584) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:49:51.291092"], ["updated_at", "2021-02-15 06:49:51.291092"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/admin Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 866) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (30.5ms) SELECT COUNT(*) FROM "multi_applications_accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} MultiApplicationsAccount Load (0.6ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "test.host"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (2.3ms) INSERT 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" [["created_at", "2021-02-15 06:49:51.366257"], ["updated_at", "2021-02-15 06:49:51.366257"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 16ms (ActiveRecord: 5.3ms | Allocations: 6002)  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (0.2ms) SELECT COUNT(*) FROM "accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:49:51.376703"], ["updated_at", "2021-02-15 06:49:51.376703"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 873)  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/signed_out Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 118) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/ Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 117) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.409016"], ["updated_at", "2021-02-15 06:49:51.409016"], ["synced_id", 123], ["host", "example.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.411410"], ["updated_at", "2021-02-15 06:49:51.411410"], ["synced_id", 123], ["host", "test.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.8ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "test.host"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.9ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:49:51.424355"], ["updated_at", "2021-02-15 06:49:51.424355"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.439109"], ["updated_at", "2021-02-15 06:49:51.439109"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.tesu"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.5ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.7ms) INSERT 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" [["created_at", "2021-02-15 06:49:51.448906"], ["updated_at", "2021-02-15 06:49:51.448906"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.472144"], ["updated_at", "2021-02-15 06:49:51.472144"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.475134"], ["updated_at", "2021-02-15 06:49:51.475134"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test2.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "234"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "567"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.477677"], ["updated_at", "2021-02-15 06:49:51.477677"], ["host", "test2.example"], ["client_id", "234"], ["client_secret", "567"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.481536"], ["updated_at", "2021-02-15 06:49:51.481536"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.483530"], ["updated_at", "2021-02-15 06:49:51.483530"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.485424"], ["updated_at", "2021-02-15 06:49:51.485424"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.487392"], ["updated_at", "2021-02-15 06:49:51.487392"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:49:51.490990"], ["updated_at", "2021-02-15 06:49:51.490990"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 47], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 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 [["id", 47], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (1.6ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "multi_applications_accounts"."id" = $5 [["updated_at", "2021-02-15 06:49:51.496047"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 47]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 47], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:49:51.503649"], ["updated_at", "2021-02-15 06:49:51.503649"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613458191"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.506801"], ["updated_at", "2021-02-15 06:49:51.506801"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:49:51.510800"], ["updated_at", "2021-02-15 06:49:51.510800"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285391"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.515198"], ["updated_at", "2021-02-15 06:49:51.515198"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["synced_id", 123], ["id", 49], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.3ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "multi_applications_accounts"."id" = $4 [["updated_at", "2021-02-15 06:49:51.552620"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 49]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.556316"], ["updated_at", "2021-02-15 06:49:51.556316"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.558186"], ["updated_at", "2021-02-15 06:49:51.558186"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.559930"], ["updated_at", "2021-02-15 06:49:51.559930"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.561902"], ["updated_at", "2021-02-15 06:49:51.561902"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.565457"], ["updated_at", "2021-02-15 06:49:51.565457"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.4ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.591475"], ["updated_at", "2021-02-15 06:49:51.591475"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "client_id"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "client_secret"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.609192"], ["updated_at", "2021-02-15 06:49:51.609192"], ["host", "host"], ["client_id", "client_id"], ["client_secret", "client_secret"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.686363"], ["updated_at", "2021-02-15 06:49:51.686363"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.689094"], ["updated_at", "2021-02-15 06:49:51.689094"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.1ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.692376"], ["updated_at", "2021-02-15 06:49:51.692376"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.694221"], ["updated_at", "2021-02-15 06:49:51.694221"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:49:51.697906"], ["updated_at", "2021-02-15 06:49:51.697906"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:49:51.702293"], ["updated_at", "2021-02-15 06:49:51.702293"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.704044"], ["updated_at", "2021-02-15 06:49:51.704044"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:49:51.707285"], ["updated_at", "2021-02-15 06:49:51.707285"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.709003"], ["updated_at", "2021-02-15 06:49:51.709003"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:49:51.712600"], ["updated_at", "2021-02-15 06:49:51.712600"], ["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"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.715072"], ["updated_at", "2021-02-15 06:49:51.715072"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.718199"], ["updated_at", "2021-02-15 06:49:51.718199"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.720217"], ["updated_at", "2021-02-15 06:49:51.720217"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 65], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.3ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-15 06:49:51.722952"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 65]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.726362"], ["updated_at", "2021-02-15 06:49:51.726362"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.728854"], ["updated_at", "2021-02-15 06:49:51.728854"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 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 [["synced_id", 123], ["id", 67], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-15 06:49:51.732752"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 67]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 67], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.736311"], ["updated_at", "2021-02-15 06:49:51.736311"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.738113"], ["updated_at", "2021-02-15 06:49:51.738113"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["synced_id", 123], ["id", 69], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-15 06:49:51.740799"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 69]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 69], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.744367"], ["updated_at", "2021-02-15 06:49:51.744367"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.746987"], ["updated_at", "2021-02-15 06:49:51.746987"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.752445"], ["updated_at", "2021-02-15 06:49:51.752445"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.1ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 3) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 3ms (Views: 2.9ms | ActiveRecord: 0.0ms | Allocations: 552) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 225) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 1) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 5ms (Views: 4.3ms | ActiveRecord: 0.0ms | Allocations: 311) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 1) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 171) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2021-02-15 06:49:51.854318"], ["updated_at", "2021-02-15 06:49:51.854318"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3 [["updated_at", "2021-02-15 06:49:51.855624"], ["synced_id", 0], ["id", 43]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 0], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:49:51.860249"], ["updated_at", "2021-02-15 06:49:51.860249"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613458191"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:49:51.863880"], ["updated_at", "2021-02-15 06:49:51.863880"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285391"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.4ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 45], ["LIMIT", 1]] Account Update (0.4ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-15 06:49:51.878344"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 45]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:49:51.883842"], ["updated_at", "2021-02-15 06:49:51.883842"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285391"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:49:51.887669"], ["updated_at", "2021-02-15 06:49:51.887669"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285391"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 47], ["LIMIT", 1]] Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-15 06:49:51.903109"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 47]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.906273"], ["updated_at", "2021-02-15 06:49:51.906273"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:49:51.909308"], ["updated_at", "2021-02-15 06:49:51.909308"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 49], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND "accounts"."id" != $1 LIMIT $2 [["id", 49], ["LIMIT", 1]] Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5 [["updated_at", "2021-02-15 06:49:51.912565"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 49]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 49], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:49:51.917991"], ["updated_at", "2021-02-15 06:49:51.917991"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:49:51.920675"], ["updated_at", "2021-02-15 06:49:51.920675"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:49:51.924596"], ["updated_at", "2021-02-15 06:49:51.924596"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:49:51.926140"], ["updated_at", "2021-02-15 06:49:51.926140"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:49:51.927685"], ["updated_at", "2021-02-15 06:49:51.927685"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:49:51.932117"], ["updated_at", "2021-02-15 06:49:51.932117"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:49:51.934083"], ["updated_at", "2021-02-15 06:49:51.934083"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:49:51.935777"], ["updated_at", "2021-02-15 06:49:51.935777"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:49:51.939172"], ["updated_at", "2021-02-15 06:49:51.939172"], ["synced_id", 123]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:49:51.955992"], ["updated_at", "2021-02-15 06:49:51.955992"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:49:51.960350"], ["updated_at", "2021-02-15 06:49:51.960350"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.4ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.4ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.978800"], ["updated_at", "2021-02-15 06:49:51.978800"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.4ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.982144"], ["updated_at", "2021-02-15 06:49:51.982144"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 62], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:49:51.984734"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 62]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.987401"], ["updated_at", "2021-02-15 06:49:51.987401"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.988955"], ["updated_at", "2021-02-15 06:49:51.988955"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 64], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:49:51.991187"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 64]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 64], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.994365"], ["updated_at", "2021-02-15 06:49:51.994365"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:51.996098"], ["updated_at", "2021-02-15 06:49:51.996098"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 66], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:49:51.998566"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 66]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 66], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:52.002236"], ["updated_at", "2021-02-15 06:49:52.002236"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:52.003883"], ["updated_at", "2021-02-15 06:49:52.003883"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 68], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:49:52.006044"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 68]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:52.008629"], ["updated_at", "2021-02-15 06:49:52.008629"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:49:52.011476"], ["updated_at", "2021-02-15 06:49:52.011476"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:52.016295"], ["updated_at", "2021-02-15 06:49:52.016295"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:49:52.018886"], ["updated_at", "2021-02-15 06:49:52.018886"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:52.021844"], ["updated_at", "2021-02-15 06:49:52.021844"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:49:52.024306"], ["updated_at", "2021-02-15 06:49:52.024306"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.4ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:49:52.027115"], ["updated_at", "2021-02-15 06:49:52.027115"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:49:52.030730"], ["updated_at", "2021-02-15 06:49:52.030730"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 5) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 18ms (Views: 5.9ms | ActiveRecord: 0.0ms | Allocations: 2627) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 227) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 1) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 3ms (Views: 2.7ms | ActiveRecord: 0.0ms | Allocations: 342) TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 1) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 156) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (2.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.4ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.371919"], ["updated_at", "2021-02-15 06:53:12.371919"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "ABC"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.389629"], ["updated_at", "2021-02-15 06:53:12.389629"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.395583"], ["updated_at", "2021-02-15 06:53:12.395583"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.402387"], ["updated_at", "2021-02-15 06:53:12.402387"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "TEST.HOST"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.411545"], ["updated_at", "2021-02-15 06:53:12.411545"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.6ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "DEF"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.423044"], ["updated_at", "2021-02-15 06:53:12.423044"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (3.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.8ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.443898"], ["updated_at", "2021-02-15 06:53:12.443898"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 73], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["id", 73], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.3ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "multi_applications_accounts"."id" = $5 [["updated_at", "2021-02-15 06:53:12.454066"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 73]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 73], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.457755"], ["updated_at", "2021-02-15 06:53:12.457755"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.459428"], ["updated_at", "2021-02-15 06:53:12.459428"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (2.8ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.5ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.465841"], ["updated_at", "2021-02-15 06:53:12.465841"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.468450"], ["updated_at", "2021-02-15 06:53:12.468450"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 76], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-15 06:53:12.471955"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 76]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.476910"], ["updated_at", "2021-02-15 06:53:12.476910"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.478722"], ["updated_at", "2021-02-15 06:53:12.478722"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.4ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["synced_id", 123], ["id", 78], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-15 06:53:12.483034"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 78]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 78], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.487264"], ["updated_at", "2021-02-15 06:53:12.487264"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.489550"], ["updated_at", "2021-02-15 06:53:12.489550"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 80], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-15 06:53:12.492259"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 80]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 80], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.495840"], ["updated_at", "2021-02-15 06:53:12.495840"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.6ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.6ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.498875"], ["updated_at", "2021-02-15 06:53:12.498875"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.503331"], ["updated_at", "2021-02-15 06:53:12.503331"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.508154"], ["updated_at", "2021-02-15 06:53:12.508154"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.510024"], ["updated_at", "2021-02-15 06:53:12.510024"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.5ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.514153"], ["updated_at", "2021-02-15 06:53:12.514153"], ["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"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.518148"], ["updated_at", "2021-02-15 06:53:12.518148"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.2ms) BEGIN MultiApplicationsAccount Load (0.4ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.526437"], ["updated_at", "2021-02-15 06:53:12.526437"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (1.0ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.531149"], ["updated_at", "2021-02-15 06:53:12.531149"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.4ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.536278"], ["updated_at", "2021-02-15 06:53:12.536278"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.5ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.5ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.541612"], ["updated_at", "2021-02-15 06:53:12.541612"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Application Load (0.5ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.4ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.4ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "client_id"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "client_secret"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.552135"], ["updated_at", "2021-02-15 06:53:12.552135"], ["host", "host"], ["client_id", "client_id"], ["client_secret", "client_secret"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.583124"], ["updated_at", "2021-02-15 06:53:12.583124"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.tesu"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.591254"], ["updated_at", "2021-02-15 06:53:12.591254"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.594386"], ["updated_at", "2021-02-15 06:53:12.594386"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.596968"], ["updated_at", "2021-02-15 06:53:12.596968"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.619524"], ["updated_at", "2021-02-15 06:53:12.619524"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.622026"], ["updated_at", "2021-02-15 06:53:12.622026"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test2.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "234"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "567"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.624643"], ["updated_at", "2021-02-15 06:53:12.624643"], ["host", "test2.example"], ["client_id", "234"], ["client_secret", "567"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.628045"], ["updated_at", "2021-02-15 06:53:12.628045"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.629796"], ["updated_at", "2021-02-15 06:53:12.629796"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.631916"], ["updated_at", "2021-02-15 06:53:12.631916"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.634238"], ["updated_at", "2021-02-15 06:53:12.634238"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.638276"], ["updated_at", "2021-02-15 06:53:12.638276"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.639999"], ["updated_at", "2021-02-15 06:53:12.639999"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.641853"], ["updated_at", "2021-02-15 06:53:12.641853"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.643544"], ["updated_at", "2021-02-15 06:53:12.643544"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.647280"], ["updated_at", "2021-02-15 06:53:12.647280"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285592"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.4ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.650510"], ["updated_at", "2021-02-15 06:53:12.650510"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["synced_id", 123], ["id", 104], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.3ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "multi_applications_accounts"."id" = $4 [["updated_at", "2021-02-15 06:53:12.687683"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 104]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.691318"], ["updated_at", "2021-02-15 06:53:12.691318"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613458392"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.694893"], ["updated_at", "2021-02-15 06:53:12.694893"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.726738"], ["updated_at", "2021-02-15 06:53:12.726738"], ["synced_id", 123], ["host", "example.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.5ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.729139"], ["updated_at", "2021-02-15 06:53:12.729139"], ["synced_id", 123], ["host", "test.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "test.host"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (1.6ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.7ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:53:12.746988"], ["updated_at", "2021-02-15 06:53:12.746988"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 1.5ms | Allocations: 269) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 1.6ms | Allocations: 358) Completed 200 OK in 8ms (Views: 3.2ms | ActiveRecord: 0.0ms | Allocations: 2042) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 0.1ms | Allocations: 53) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 0.3ms | Allocations: 139) Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms | Allocations: 433) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 141) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/signed_out Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 117) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.7ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.783833"], ["updated_at", "2021-02-15 06:53:12.783833"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/admin Completed 302 Found in 4ms (ActiveRecord: 1.4ms | Allocations: 877) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.788541"], ["updated_at", "2021-02-15 06:53:12.788541"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 867) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (0.2ms) SELECT COUNT(*) FROM "accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.793615"], ["updated_at", "2021-02-15 06:53:12.793615"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 873)  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (0.3ms) SELECT COUNT(*) FROM "multi_applications_accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "test.host"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.802436"], ["updated_at", "2021-02-15 06:53:12.802436"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 4ms (ActiveRecord: 0.9ms | Allocations: 954)  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.809022"], ["updated_at", "2021-02-15 06:53:12.809022"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.1ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.812714"], ["updated_at", "2021-02-15 06:53:12.812714"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.816573"], ["updated_at", "2021-02-15 06:53:12.816573"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.819564"], ["updated_at", "2021-02-15 06:53:12.819564"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.822765"], ["updated_at", "2021-02-15 06:53:12.822765"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.825283"], ["updated_at", "2021-02-15 06:53:12.825283"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.828087"], ["updated_at", "2021-02-15 06:53:12.828087"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.830415"], ["updated_at", "2021-02-15 06:53:12.830415"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.834509"], ["updated_at", "2021-02-15 06:53:12.834509"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.836615"], ["updated_at", "2021-02-15 06:53:12.836615"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.839183"], ["updated_at", "2021-02-15 06:53:12.839183"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.841180"], ["updated_at", "2021-02-15 06:53:12.841180"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 91], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:53:12.843414"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 91]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.846308"], ["updated_at", "2021-02-15 06:53:12.846308"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.5ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.848430"], ["updated_at", "2021-02-15 06:53:12.848430"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.9ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 93], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:53:12.853161"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 93]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 93], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.856707"], ["updated_at", "2021-02-15 06:53:12.856707"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.858456"], ["updated_at", "2021-02-15 06:53:12.858456"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 95], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:53:12.860595"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 95]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 95], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.863853"], ["updated_at", "2021-02-15 06:53:12.863853"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.4ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:53:12.866372"], ["updated_at", "2021-02-15 06:53:12.866372"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 97], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:53:12.871209"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 97]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:53:12.874701"], ["updated_at", "2021-02-15 06:53:12.874701"], ["synced_id", 1]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:53:12.876363"], ["updated_at", "2021-02-15 06:53:12.876363"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:53:12.877931"], ["updated_at", "2021-02-15 06:53:12.877931"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2021-02-15 06:53:12.881719"], ["updated_at", "2021-02-15 06:53:12.881719"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3 [["updated_at", "2021-02-15 06:53:12.883196"], ["synced_id", 0], ["id", 101]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 0], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:53:12.888813"], ["updated_at", "2021-02-15 06:53:12.888813"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 102], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND "accounts"."id" != $1 LIMIT $2 [["id", 102], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5 [["updated_at", "2021-02-15 06:53:12.891728"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 102]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 102], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.896891"], ["updated_at", "2021-02-15 06:53:12.896891"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613458392"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.900274"], ["updated_at", "2021-02-15 06:53:12.900274"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285592"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 104], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-15 06:53:12.918467"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 104]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (1.5ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.922960"], ["updated_at", "2021-02-15 06:53:12.922960"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285592"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 105], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-15 06:53:12.940750"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 105]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:53:12.943995"], ["updated_at", "2021-02-15 06:53:12.943995"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285592"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:53:12.951644"], ["updated_at", "2021-02-15 06:53:12.951644"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:53:12.955115"], ["updated_at", "2021-02-15 06:53:12.955115"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:53:12.970566"], ["updated_at", "2021-02-15 06:53:12.970566"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:53:12.986593"], ["updated_at", "2021-02-15 06:53:12.986593"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:53:12.989914"], ["updated_at", "2021-02-15 06:53:12.989914"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:53:12.991464"], ["updated_at", "2021-02-15 06:53:12.991464"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:53:12.992935"], ["updated_at", "2021-02-15 06:53:12.992935"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:53:12.999821"], ["updated_at", "2021-02-15 06:53:12.999821"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (2.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.4ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.216307"], ["updated_at", "2021-02-15 06:57:10.216307"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.261550"], ["updated_at", "2021-02-15 06:57:10.261550"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "ABC"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.271767"], ["updated_at", "2021-02-15 06:57:10.271767"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.278394"], ["updated_at", "2021-02-15 06:57:10.278394"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.284189"], ["updated_at", "2021-02-15 06:57:10.284189"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "DEF"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.293324"], ["updated_at", "2021-02-15 06:57:10.293324"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "TEST.HOST"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (2.4ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.8ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:10.354418"], ["updated_at", "2021-02-15 06:57:10.354418"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (3.1ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.6ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.380379"], ["updated_at", "2021-02-15 06:57:10.380379"], ["synced_id", 123], ["host", "example.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.382735"], ["updated_at", "2021-02-15 06:57:10.382735"], ["synced_id", 123], ["host", "test.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "test.host"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.387782"], ["updated_at", "2021-02-15 06:57:10.387782"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 111], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["id", 111], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.3ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "multi_applications_accounts"."id" = $5 [["updated_at", "2021-02-15 06:57:10.397158"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 111]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 111], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.401166"], ["updated_at", "2021-02-15 06:57:10.401166"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.402984"], ["updated_at", "2021-02-15 06:57:10.402984"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.405016"], ["updated_at", "2021-02-15 06:57:10.405016"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.407403"], ["updated_at", "2021-02-15 06:57:10.407403"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.411130"], ["updated_at", "2021-02-15 06:57:10.411130"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.413778"], ["updated_at", "2021-02-15 06:57:10.413778"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test2.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "234"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "567"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.416267"], ["updated_at", "2021-02-15 06:57:10.416267"], ["host", "test2.example"], ["client_id", "234"], ["client_secret", "567"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.420020"], ["updated_at", "2021-02-15 06:57:10.420020"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.423765"], ["updated_at", "2021-02-15 06:57:10.423765"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.426812"], ["updated_at", "2021-02-15 06:57:10.426812"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.450360"], ["updated_at", "2021-02-15 06:57:10.450360"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.452002"], ["updated_at", "2021-02-15 06:57:10.452002"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.456941"], ["updated_at", "2021-02-15 06:57:10.456941"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.459259"], ["updated_at", "2021-02-15 06:57:10.459259"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.463007"], ["updated_at", "2021-02-15 06:57:10.463007"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.467056"], ["updated_at", "2021-02-15 06:57:10.467056"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.468836"], ["updated_at", "2021-02-15 06:57:10.468836"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.472423"], ["updated_at", "2021-02-15 06:57:10.472423"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.474215"], ["updated_at", "2021-02-15 06:57:10.474215"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.479830"], ["updated_at", "2021-02-15 06:57:10.479830"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.481715"], ["updated_at", "2021-02-15 06:57:10.481715"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.484504"], ["updated_at", "2021-02-15 06:57:10.484504"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.486194"], ["updated_at", "2021-02-15 06:57:10.486194"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["synced_id", 123], ["id", 130], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-15 06:57:10.488899"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 130]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.492447"], ["updated_at", "2021-02-15 06:57:10.492447"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.494835"], ["updated_at", "2021-02-15 06:57:10.494835"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 132], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-15 06:57:10.497570"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 132]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 132], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.501153"], ["updated_at", "2021-02-15 06:57:10.501153"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.502976"], ["updated_at", "2021-02-15 06:57:10.502976"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 134], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-15 06:57:10.505393"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 134]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 134], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "client_id"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "client_secret"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.510699"], ["updated_at", "2021-02-15 06:57:10.510699"], ["host", "host"], ["client_id", "client_id"], ["client_secret", "client_secret"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.535901"], ["updated_at", "2021-02-15 06:57:10.535901"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.538846"], ["updated_at", "2021-02-15 06:57:10.538846"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.542809"], ["updated_at", "2021-02-15 06:57:10.542809"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.544745"], ["updated_at", "2021-02-15 06:57:10.544745"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.546441"], ["updated_at", "2021-02-15 06:57:10.546441"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.548135"], ["updated_at", "2021-02-15 06:57:10.548135"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.551685"], ["updated_at", "2021-02-15 06:57:10.551685"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.tesu"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.560215"], ["updated_at", "2021-02-15 06:57:10.560215"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613458630"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.563209"], ["updated_at", "2021-02-15 06:57:10.563209"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.566664"], ["updated_at", "2021-02-15 06:57:10.566664"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285830"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.4ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.591512"], ["updated_at", "2021-02-15 06:57:10.591512"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["synced_id", 123], ["id", 143], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "multi_applications_accounts"."id" = $4 [["updated_at", "2021-02-15 06:57:10.605422"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 143]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 5) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 16ms (Views: 4.1ms | ActiveRecord: 0.0ms | Allocations: 2111) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 206) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 223) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 207) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.664070"], ["updated_at", "2021-02-15 06:57:10.664070"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.1ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.669813"], ["updated_at", "2021-02-15 06:57:10.669813"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 952) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.674819"], ["updated_at", "2021-02-15 06:57:10.674819"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/admin Completed 302 Found in 3ms (ActiveRecord: 0.9ms | Allocations: 865) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (0.2ms) SELECT COUNT(*) FROM "accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.683055"], ["updated_at", "2021-02-15 06:57:10.683055"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 873)  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "test.host"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.689800"], ["updated_at", "2021-02-15 06:57:10.689800"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 954)  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 1.4ms | Allocations: 269) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 1.6ms | Allocations: 358) Completed 200 OK in 8ms (Views: 3.2ms | ActiveRecord: 0.0ms | Allocations: 1998) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 0.1ms | Allocations: 53) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 0.3ms | Allocations: 139) Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms | Allocations: 436) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/signed_out Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 118) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 117) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.714089"], ["updated_at", "2021-02-15 06:57:10.714089"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613458630"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.716770"], ["updated_at", "2021-02-15 06:57:10.716770"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285830"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 120], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-15 06:57:10.731896"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 120]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.735049"], ["updated_at", "2021-02-15 06:57:10.735049"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285830"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 121], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-15 06:57:10.748918"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 121]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.751612"], ["updated_at", "2021-02-15 06:57:10.751612"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285830"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:10.754719"], ["updated_at", "2021-02-15 06:57:10.754719"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:10.756301"], ["updated_at", "2021-02-15 06:57:10.756301"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:10.758097"], ["updated_at", "2021-02-15 06:57:10.758097"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.762100"], ["updated_at", "2021-02-15 06:57:10.762100"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:10.764891"], ["updated_at", "2021-02-15 06:57:10.764891"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:10.767440"], ["updated_at", "2021-02-15 06:57:10.767440"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:10.768933"], ["updated_at", "2021-02-15 06:57:10.768933"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:10.770454"], ["updated_at", "2021-02-15 06:57:10.770454"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:10.773506"], ["updated_at", "2021-02-15 06:57:10.773506"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:10.787459"], ["updated_at", "2021-02-15 06:57:10.787459"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:10.791168"], ["updated_at", "2021-02-15 06:57:10.791168"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2021-02-15 06:57:10.807649"], ["updated_at", "2021-02-15 06:57:10.807649"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3 [["updated_at", "2021-02-15 06:57:10.808956"], ["synced_id", 0], ["id", 134]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 0], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:10.813560"], ["updated_at", "2021-02-15 06:57:10.813560"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:10.816142"], ["updated_at", "2021-02-15 06:57:10.816142"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 136], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND "accounts"."id" != $1 LIMIT $2 [["id", 136], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5 [["updated_at", "2021-02-15 06:57:10.818691"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 136]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 136], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.822071"], ["updated_at", "2021-02-15 06:57:10.822071"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.825172"], ["updated_at", "2021-02-15 06:57:10.825172"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.829686"], ["updated_at", "2021-02-15 06:57:10.829686"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.832336"], ["updated_at", "2021-02-15 06:57:10.832336"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.835083"], ["updated_at", "2021-02-15 06:57:10.835083"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.837257"], ["updated_at", "2021-02-15 06:57:10.837257"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.839834"], ["updated_at", "2021-02-15 06:57:10.839834"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:10.842545"], ["updated_at", "2021-02-15 06:57:10.842545"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.845590"], ["updated_at", "2021-02-15 06:57:10.845590"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.847119"], ["updated_at", "2021-02-15 06:57:10.847119"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 146], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:57:10.849241"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 146]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.852013"], ["updated_at", "2021-02-15 06:57:10.852013"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.853556"], ["updated_at", "2021-02-15 06:57:10.853556"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 148], ["LIMIT", 1]] Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:57:10.856249"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 148]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.860337"], ["updated_at", "2021-02-15 06:57:10.860337"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.862342"], ["updated_at", "2021-02-15 06:57:10.862342"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 150], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:57:10.864845"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 150]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 150], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.868126"], ["updated_at", "2021-02-15 06:57:10.868126"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:10.869937"], ["updated_at", "2021-02-15 06:57:10.869937"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 152], ["LIMIT", 1]] Account Update (0.4ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:57:10.872254"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 152]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 152], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (1.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.8ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:54.843225"], ["updated_at", "2021-02-15 06:57:54.843225"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (1.7ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:57:54.882283"], ["updated_at", "2021-02-15 06:57:54.882283"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613458674"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:54.888950"], ["updated_at", "2021-02-15 06:57:54.888950"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285874"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 155], ["LIMIT", 1]] Account Update (0.4ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-15 06:57:54.910802"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 155]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.7ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:57:54.915747"], ["updated_at", "2021-02-15 06:57:54.915747"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285874"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 156], ["LIMIT", 1]] Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-15 06:57:54.945417"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 156]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:54.949435"], ["updated_at", "2021-02-15 06:57:54.949435"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285874"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:54.955423"], ["updated_at", "2021-02-15 06:57:54.955423"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:54.957934"], ["updated_at", "2021-02-15 06:57:54.957934"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:54.974453"], ["updated_at", "2021-02-15 06:57:54.974453"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:54.978020"], ["updated_at", "2021-02-15 06:57:54.978020"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:54.992776"], ["updated_at", "2021-02-15 06:57:54.992776"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:54.994335"], ["updated_at", "2021-02-15 06:57:54.994335"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:54.996091"], ["updated_at", "2021-02-15 06:57:54.996091"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:55.001057"], ["updated_at", "2021-02-15 06:57:55.001057"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:55.002715"], ["updated_at", "2021-02-15 06:57:55.002715"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:55.004170"], ["updated_at", "2021-02-15 06:57:55.004170"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.007341"], ["updated_at", "2021-02-15 06:57:55.007341"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:55.013976"], ["updated_at", "2021-02-15 06:57:55.013976"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.017539"], ["updated_at", "2021-02-15 06:57:55.017539"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:55.020135"], ["updated_at", "2021-02-15 06:57:55.020135"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.023104"], ["updated_at", "2021-02-15 06:57:55.023104"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:55.025427"], ["updated_at", "2021-02-15 06:57:55.025427"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.029634"], ["updated_at", "2021-02-15 06:57:55.029634"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:55.032453"], ["updated_at", "2021-02-15 06:57:55.032453"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.035261"], ["updated_at", "2021-02-15 06:57:55.035261"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.037099"], ["updated_at", "2021-02-15 06:57:55.037099"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 177], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:57:55.039467"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 177]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.042076"], ["updated_at", "2021-02-15 06:57:55.042076"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.043749"], ["updated_at", "2021-02-15 06:57:55.043749"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 179], ["LIMIT", 1]] Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:57:55.046385"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 179]] TRANSACTION (0.5ms) RELEASE SAVEPOINT active_record_1 Account Load (0.4ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 179], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.054690"], ["updated_at", "2021-02-15 06:57:55.054690"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.056434"], ["updated_at", "2021-02-15 06:57:55.056434"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 181], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:57:55.058825"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 181]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 181], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.062230"], ["updated_at", "2021-02-15 06:57:55.062230"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.063939"], ["updated_at", "2021-02-15 06:57:55.063939"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 183], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:57:55.066443"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 183]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.069232"], ["updated_at", "2021-02-15 06:57:55.069232"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 184], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND "accounts"."id" != $1 LIMIT $2 [["id", 184], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5 [["updated_at", "2021-02-15 06:57:55.074516"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 184]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 184], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2021-02-15 06:57:55.078209"], ["updated_at", "2021-02-15 06:57:55.078209"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3 [["updated_at", "2021-02-15 06:57:55.079668"], ["synced_id", 0], ["id", 185]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 0], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.090706"], ["updated_at", "2021-02-15 06:57:55.090706"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (3.0ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.7ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.135293"], ["updated_at", "2021-02-15 06:57:55.135293"], ["synced_id", 123], ["host", "example.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.137929"], ["updated_at", "2021-02-15 06:57:55.137929"], ["synced_id", 123], ["host", "test.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "test.host"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:57:55.160469"], ["updated_at", "2021-02-15 06:57:55.160469"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 1.3ms | Allocations: 269) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 1.5ms | Allocations: 362) Completed 200 OK in 20ms (Views: 4.5ms | ActiveRecord: 0.0ms | Allocations: 3584) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 0.1ms | Allocations: 53) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 0.3ms | Allocations: 139) Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms | Allocations: 433) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 152) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/signed_out Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 117) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:55.206099"], ["updated_at", "2021-02-15 06:57:55.206099"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 868) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:55.210374"], ["updated_at", "2021-02-15 06:57:55.210374"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/admin Completed 302 Found in 2ms (ActiveRecord: 0.7ms | Allocations: 865) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN  (0.4ms) SELECT COUNT(*) FROM "multi_applications_accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "test.host"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:55.217847"], ["updated_at", "2021-02-15 06:57:55.217847"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 4ms (ActiveRecord: 0.9ms | Allocations: 964)  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (0.2ms) SELECT COUNT(*) FROM "accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:55.224964"], ["updated_at", "2021-02-15 06:57:55.224964"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 873)  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:55.271218"], ["updated_at", "2021-02-15 06:57:55.271218"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.274611"], ["updated_at", "2021-02-15 06:57:55.274611"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 Application Exists? (3.5ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (1.0ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.281331"], ["updated_at", "2021-02-15 06:57:55.281331"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.9ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.298659"], ["updated_at", "2021-02-15 06:57:55.298659"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.7ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.302058"], ["updated_at", "2021-02-15 06:57:55.302058"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.305648"], ["updated_at", "2021-02-15 06:57:55.305648"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.tesu"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.8ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:57:55.313625"], ["updated_at", "2021-02-15 06:57:55.313625"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 152], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["id", 152], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "multi_applications_accounts"."id" = $5 [["updated_at", "2021-02-15 06:57:55.317505"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 152]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 152], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.321018"], ["updated_at", "2021-02-15 06:57:55.321018"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.322662"], ["updated_at", "2021-02-15 06:57:55.322662"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.324293"], ["updated_at", "2021-02-15 06:57:55.324293"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.325855"], ["updated_at", "2021-02-15 06:57:55.325855"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "client_id"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "client_secret"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.329831"], ["updated_at", "2021-02-15 06:57:55.329831"], ["host", "host"], ["client_id", "client_id"], ["client_secret", "client_secret"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.334118"], ["updated_at", "2021-02-15 06:57:55.334118"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.335846"], ["updated_at", "2021-02-15 06:57:55.335846"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.337635"], ["updated_at", "2021-02-15 06:57:55.337635"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.339343"], ["updated_at", "2021-02-15 06:57:55.339343"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.342976"], ["updated_at", "2021-02-15 06:57:55.342976"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.344762"], ["updated_at", "2021-02-15 06:57:55.344762"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.348043"], ["updated_at", "2021-02-15 06:57:55.348043"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.350611"], ["updated_at", "2021-02-15 06:57:55.350611"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 163], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-15 06:57:55.353509"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 163]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.356581"], ["updated_at", "2021-02-15 06:57:55.356581"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.358300"], ["updated_at", "2021-02-15 06:57:55.358300"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 165], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-15 06:57:55.360719"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 165]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 165], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.364080"], ["updated_at", "2021-02-15 06:57:55.364080"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.366368"], ["updated_at", "2021-02-15 06:57:55.366368"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 167], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-15 06:57:55.369452"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 167]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 167], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.372873"], ["updated_at", "2021-02-15 06:57:55.372873"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.374612"], ["updated_at", "2021-02-15 06:57:55.374612"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:55.377320"], ["updated_at", "2021-02-15 06:57:55.377320"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:57:55.382283"], ["updated_at", "2021-02-15 06:57:55.382283"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.384673"], ["updated_at", "2021-02-15 06:57:55.384673"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:55.388003"], ["updated_at", "2021-02-15 06:57:55.388003"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.389730"], ["updated_at", "2021-02-15 06:57:55.389730"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:55.392716"], ["updated_at", "2021-02-15 06:57:55.392716"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.394356"], ["updated_at", "2021-02-15 06:57:55.394356"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:55.397560"], ["updated_at", "2021-02-15 06:57:55.397560"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613458675"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.400380"], ["updated_at", "2021-02-15 06:57:55.400380"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:57:55.403759"], ["updated_at", "2021-02-15 06:57:55.403759"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285875"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.406304"], ["updated_at", "2021-02-15 06:57:55.406304"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["synced_id", 123], ["id", 179], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "multi_applications_accounts"."id" = $4 [["updated_at", "2021-02-15 06:57:55.420512"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 179]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:57:55.423721"], ["updated_at", "2021-02-15 06:57:55.423721"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.426458"], ["updated_at", "2021-02-15 06:57:55.426458"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test2.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "234"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "567"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.428904"], ["updated_at", "2021-02-15 06:57:55.428904"], ["host", "test2.example"], ["client_id", "234"], ["client_secret", "567"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.438510"], ["updated_at", "2021-02-15 06:57:55.438510"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.1ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.442741"], ["updated_at", "2021-02-15 06:57:55.442741"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "TEST.HOST"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.452033"], ["updated_at", "2021-02-15 06:57:55.452033"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.457730"], ["updated_at", "2021-02-15 06:57:55.457730"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.463058"], ["updated_at", "2021-02-15 06:57:55.463058"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "ABC"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.471594"], ["updated_at", "2021-02-15 06:57:55.471594"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "DEF"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:57:55.480041"], ["updated_at", "2021-02-15 06:57:55.480041"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 3) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms | Allocations: 552) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 225) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 223) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 207) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 5) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 15ms (Views: 5.8ms | ActiveRecord: 0.0ms | Allocations: 2631) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 224) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 206) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 225) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (3.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.8ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:41.733583"], ["updated_at", "2021-02-15 06:58:41.733583"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (2.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.9ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.7ms) INSERT 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" [["created_at", "2021-02-15 06:58:41.768793"], ["updated_at", "2021-02-15 06:58:41.768793"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 16ms (ActiveRecord: 6.4ms | Allocations: 6615) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:58:41.774662"], ["updated_at", "2021-02-15 06:58:41.774662"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/admin Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 866) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (0.5ms) SELECT COUNT(*) FROM "accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.4ms) INSERT 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" [["created_at", "2021-02-15 06:58:41.787998"], ["updated_at", "2021-02-15 06:58:41.787998"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 4ms (ActiveRecord: 1.2ms | Allocations: 873)  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (4.1ms) SELECT COUNT(*) FROM "multi_applications_accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} MultiApplicationsAccount Load (0.4ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "test.host"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.5ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (1.4ms) INSERT 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" [["created_at", "2021-02-15 06:58:41.814013"], ["updated_at", "2021-02-15 06:58:41.814013"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 15ms (ActiveRecord: 4.3ms | Allocations: 6001)  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 118) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/signed_out Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 117) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 1.8ms | Allocations: 269) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 2.0ms | Allocations: 358) Completed 200 OK in 11ms (Views: 4.2ms | ActiveRecord: 0.0ms | Allocations: 2001) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 0.2ms | Allocations: 53) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 0.4ms | Allocations: 139) Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms | Allocations: 433) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.6ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:58:41.848941"], ["updated_at", "2021-02-15 06:58:41.848941"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:58:41.850936"], ["updated_at", "2021-02-15 06:58:41.850936"], ["synced_id", 2]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:58:41.853100"], ["updated_at", "2021-02-15 06:58:41.853100"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:41.857974"], ["updated_at", "2021-02-15 06:58:41.857974"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.3ms) BEGIN Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2021-02-15 06:58:41.867163"], ["updated_at", "2021-02-15 06:58:41.867163"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Update (0.4ms) UPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3 [["updated_at", "2021-02-15 06:58:41.868661"], ["synced_id", 0], ["id", 198]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Exists? (0.4ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 0], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:58:41.883782"], ["updated_at", "2021-02-15 06:58:41.883782"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:58:41.885789"], ["updated_at", "2021-02-15 06:58:41.885789"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:58:41.887838"], ["updated_at", "2021-02-15 06:58:41.887838"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:58:41.891981"], ["updated_at", "2021-02-15 06:58:41.891981"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:58:41.920026"], ["updated_at", "2021-02-15 06:58:41.920026"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:58:41.935480"], ["updated_at", "2021-02-15 06:58:41.935480"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:58:41.943001"], ["updated_at", "2021-02-15 06:58:41.943001"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:41.946664"], ["updated_at", "2021-02-15 06:58:41.946664"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 206], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND "accounts"."id" != $1 LIMIT $2 [["id", 206], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5 [["updated_at", "2021-02-15 06:58:41.950047"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 206]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 206], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:41.977383"], ["updated_at", "2021-02-15 06:58:41.977383"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:41.979137"], ["updated_at", "2021-02-15 06:58:41.979137"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 208], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:58:41.981679"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 208]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 208], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:41.985170"], ["updated_at", "2021-02-15 06:58:41.985170"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:41.987203"], ["updated_at", "2021-02-15 06:58:41.987203"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 210], ["LIMIT", 1]] Account Update (1.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:58:41.990262"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 210]] TRANSACTION (0.3ms) RELEASE SAVEPOINT active_record_1 Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 210], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:41.996861"], ["updated_at", "2021-02-15 06:58:41.996861"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:41.999415"], ["updated_at", "2021-02-15 06:58:41.999415"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 212], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:58:42.001933"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 212]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.004886"], ["updated_at", "2021-02-15 06:58:42.004886"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.006853"], ["updated_at", "2021-02-15 06:58:42.006853"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 214], ["LIMIT", 1]] Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-15 06:58:42.009975"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 214]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.4ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.014496"], ["updated_at", "2021-02-15 06:58:42.014496"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "accounts" Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:58:42.018507"], ["updated_at", "2021-02-15 06:58:42.018507"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.021905"], ["updated_at", "2021-02-15 06:58:42.021905"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:58:42.025047"], ["updated_at", "2021-02-15 06:58:42.025047"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.4ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.4ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.029329"], ["updated_at", "2021-02-15 06:58:42.029329"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.3ms) SAVEPOINT active_record_1 Account Exists? (0.5ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:58:42.034168"], ["updated_at", "2021-02-15 06:58:42.034168"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.036956"], ["updated_at", "2021-02-15 06:58:42.036956"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:58:42.039422"], ["updated_at", "2021-02-15 06:58:42.039422"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:58:42.043284"], ["updated_at", "2021-02-15 06:58:42.043284"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613458722"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.4ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.4ms) INSERT 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" [["created_at", "2021-02-15 06:58:42.047884"], ["updated_at", "2021-02-15 06:58:42.047884"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285922"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) SAVEPOINT active_record_1 Account Exists? (0.7ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 224], ["LIMIT", 1]] Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-15 06:58:42.067014"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 224]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:58:42.093535"], ["updated_at", "2021-02-15 06:58:42.093535"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285922"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 225], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-15 06:58:42.108701"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 225]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT 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" [["created_at", "2021-02-15 06:58:42.112897"], ["updated_at", "2021-02-15 06:58:42.112897"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285922"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:58:42.117892"], ["updated_at", "2021-02-15 06:58:42.117892"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.122119"], ["updated_at", "2021-02-15 06:58:42.122119"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.4ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.130922"], ["updated_at", "2021-02-15 06:58:42.130922"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.137953"], ["updated_at", "2021-02-15 06:58:42.137953"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.4ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.146106"], ["updated_at", "2021-02-15 06:58:42.146106"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Application Load (0.3ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "ABC"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.156685"], ["updated_at", "2021-02-15 06:58:42.156685"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "DEF"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.168541"], ["updated_at", "2021-02-15 06:58:42.168541"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "TEST.HOST"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.9ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.200630"], ["updated_at", "2021-02-15 06:58:42.200630"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.202612"], ["updated_at", "2021-02-15 06:58:42.202612"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.204502"], ["updated_at", "2021-02-15 06:58:42.204502"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.206544"], ["updated_at", "2021-02-15 06:58:42.206544"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.212496"], ["updated_at", "2021-02-15 06:58:42.212496"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.4ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.tesu"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.222010"], ["updated_at", "2021-02-15 06:58:42.222010"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.223936"], ["updated_at", "2021-02-15 06:58:42.223936"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.226210"], ["updated_at", "2021-02-15 06:58:42.226210"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.228469"], ["updated_at", "2021-02-15 06:58:42.228469"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:58:42.234363"], ["updated_at", "2021-02-15 06:58:42.234363"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613458722"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.237706"], ["updated_at", "2021-02-15 06:58:42.237706"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:58:42.242330"], ["updated_at", "2021-02-15 06:58:42.242330"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613285922"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.246081"], ["updated_at", "2021-02-15 06:58:42.246081"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.3ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.3ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.5ms) SELECT 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 [["synced_id", 123], ["id", 192], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.7ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "multi_applications_accounts"."id" = $4 [["updated_at", "2021-02-15 06:58:42.264298"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 192]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.269027"], ["updated_at", "2021-02-15 06:58:42.269027"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.271883"], ["updated_at", "2021-02-15 06:58:42.271883"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test2.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "234"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "567"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.275354"], ["updated_at", "2021-02-15 06:58:42.275354"], ["host", "test2.example"], ["client_id", "234"], ["client_secret", "567"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.5ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.4ms) INSERT 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" [["created_at", "2021-02-15 06:58:42.281139"], ["updated_at", "2021-02-15 06:58:42.281139"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.284996"], ["updated_at", "2021-02-15 06:58:42.284996"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.287814"], ["updated_at", "2021-02-15 06:58:42.287814"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:58:42.305661"], ["updated_at", "2021-02-15 06:58:42.305661"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 196], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["id", 196], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "multi_applications_accounts"."id" = $5 [["updated_at", "2021-02-15 06:58:42.308366"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 196]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 196], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.311690"], ["updated_at", "2021-02-15 06:58:42.311690"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.313379"], ["updated_at", "2021-02-15 06:58:42.313379"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 197], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-15 06:58:42.315794"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 197]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.318908"], ["updated_at", "2021-02-15 06:58:42.318908"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.321006"], ["updated_at", "2021-02-15 06:58:42.321006"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (1.1ms) SELECT 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 [["synced_id", 123], ["id", 199], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.4ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-15 06:58:42.325670"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 199]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 199], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.330533"], ["updated_at", "2021-02-15 06:58:42.330533"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.332719"], ["updated_at", "2021-02-15 06:58:42.332719"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 201], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-15 06:58:42.335195"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 201]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 201], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.338903"], ["updated_at", "2021-02-15 06:58:42.338903"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.341038"], ["updated_at", "2021-02-15 06:58:42.341038"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.4ms) INSERT 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" [["created_at", "2021-02-15 06:58:42.345308"], ["updated_at", "2021-02-15 06:58:42.345308"], ["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"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "multi_applications_accounts" TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.2ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:58:42.353251"], ["updated_at", "2021-02-15 06:58:42.353251"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.355360"], ["updated_at", "2021-02-15 06:58:42.355360"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.4ms) INSERT 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" [["created_at", "2021-02-15 06:58:42.360488"], ["updated_at", "2021-02-15 06:58:42.360488"], ["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"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.5ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.364044"], ["updated_at", "2021-02-15 06:58:42.364044"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-15 06:58:42.368690"], ["updated_at", "2021-02-15 06:58:42.368690"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.370714"], ["updated_at", "2021-02-15 06:58:42.370714"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.374211"], ["updated_at", "2021-02-15 06:58:42.374211"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.376526"], ["updated_at", "2021-02-15 06:58:42.376526"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.4ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "client_id"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "client_secret"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.382734"], ["updated_at", "2021-02-15 06:58:42.382734"], ["host", "host"], ["client_id", "client_id"], ["client_secret", "client_secret"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.386490"], ["updated_at", "2021-02-15 06:58:42.386490"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-15 06:58:42.389258"], ["updated_at", "2021-02-15 06:58:42.389258"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-15 06:58:42.403919"], ["updated_at", "2021-02-15 06:58:42.403919"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.411938"], ["updated_at", "2021-02-15 06:58:42.411938"], ["synced_id", 123], ["host", "example.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-15 06:58:42.413937"], ["updated_at", "2021-02-15 06:58:42.413937"], ["synced_id", 123], ["host", "test.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "test.host"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (6.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (27.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (30.7ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:18.500166"], ["updated_at", "2021-02-16 08:29:18.500166"], ["synced_id", 123], ["host", "example.host"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:18.534952"], ["updated_at", "2021-02-16 08:29:18.534952"], ["synced_id", 123], ["host", "test.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.6ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "test.host"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (13.4ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (2.0ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:29:18.569943"], ["updated_at", "2021-02-16 08:29:18.569943"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.8ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:29:18.577856"], ["updated_at", "2021-02-16 08:29:18.577856"], ["synced_id", 123]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:29:18.601774"], ["updated_at", "2021-02-16 08:29:18.601774"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:29:18.608315"], ["updated_at", "2021-02-16 08:29:18.608315"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:29:18.626037"], ["updated_at", "2021-02-16 08:29:18.626037"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613377758"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (4.8ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 233], ["LIMIT", 1]] Account Update (10.5ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-16 08:29:18.645512"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 233]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT 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" [["created_at", "2021-02-16 08:29:18.664514"], ["updated_at", "2021-02-16 08:29:18.664514"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613377758"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 234], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-16 08:29:18.679868"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 234]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:29:18.683182"], ["updated_at", "2021-02-16 08:29:18.683182"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613377758"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:29:18.687145"], ["updated_at", "2021-02-16 08:29:18.687145"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613550558"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2021-02-16 08:29:18.713602"], ["updated_at", "2021-02-16 08:29:18.713602"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3 [["updated_at", "2021-02-16 08:29:18.714917"], ["synced_id", 0], ["id", 237]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 0], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.726403"], ["updated_at", "2021-02-16 08:29:18.726403"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:29:18.737132"], ["updated_at", "2021-02-16 08:29:18.737132"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:29:18.740122"], ["updated_at", "2021-02-16 08:29:18.740122"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:29:18.742828"], ["updated_at", "2021-02-16 08:29:18.742828"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:29:18.744844"], ["updated_at", "2021-02-16 08:29:18.744844"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:29:18.746856"], ["updated_at", "2021-02-16 08:29:18.746856"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.750350"], ["updated_at", "2021-02-16 08:29:18.750350"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 244], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND "accounts"."id" != $1 LIMIT $2 [["id", 244], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5 [["updated_at", "2021-02-16 08:29:18.753108"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 244]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 244], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:29:18.756350"], ["updated_at", "2021-02-16 08:29:18.756350"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:29:18.757901"], ["updated_at", "2021-02-16 08:29:18.757901"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:29:18.759431"], ["updated_at", "2021-02-16 08:29:18.759431"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:18.764046"], ["updated_at", "2021-02-16 08:29:18.764046"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (2.9ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:29:18.770051"], ["updated_at", "2021-02-16 08:29:18.770051"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:18.773514"], ["updated_at", "2021-02-16 08:29:18.773514"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:29:18.776018"], ["updated_at", "2021-02-16 08:29:18.776018"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.4ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:18.779285"], ["updated_at", "2021-02-16 08:29:18.779285"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:29:18.782684"], ["updated_at", "2021-02-16 08:29:18.782684"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:18.787391"], ["updated_at", "2021-02-16 08:29:18.787391"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT 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" [["created_at", "2021-02-16 08:29:18.789613"], ["updated_at", "2021-02-16 08:29:18.789613"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:18.792875"], ["updated_at", "2021-02-16 08:29:18.792875"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:18.794675"], ["updated_at", "2021-02-16 08:29:18.794675"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 257], ["LIMIT", 1]] Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:29:18.798088"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 257]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:18.801125"], ["updated_at", "2021-02-16 08:29:18.801125"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:18.802736"], ["updated_at", "2021-02-16 08:29:18.802736"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 259], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:29:18.805104"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 259]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:18.808130"], ["updated_at", "2021-02-16 08:29:18.808130"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:18.810092"], ["updated_at", "2021-02-16 08:29:18.810092"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 261], ["LIMIT", 1]] Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:29:18.812574"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 261]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 261], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:18.815926"], ["updated_at", "2021-02-16 08:29:18.815926"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:18.817635"], ["updated_at", "2021-02-16 08:29:18.817635"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 263], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:29:18.820001"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 263]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 263], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.823845"], ["updated_at", "2021-02-16 08:29:18.823845"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Exists? (0.9ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.tesu"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:18.833125"], ["updated_at", "2021-02-16 08:29:18.833125"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (6.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.7ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.5ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (1.7ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.850284"], ["updated_at", "2021-02-16 08:29:18.850284"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:29:18.855991"], ["updated_at", "2021-02-16 08:29:18.855991"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.8ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.859447"], ["updated_at", "2021-02-16 08:29:18.859447"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.862729"], ["updated_at", "2021-02-16 08:29:18.862729"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:29:18.865912"], ["updated_at", "2021-02-16 08:29:18.865912"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:29:18.869980"], ["updated_at", "2021-02-16 08:29:18.869980"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.871863"], ["updated_at", "2021-02-16 08:29:18.871863"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.2ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT 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" [["created_at", "2021-02-16 08:29:18.875824"], ["updated_at", "2021-02-16 08:29:18.875824"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.877881"], ["updated_at", "2021-02-16 08:29:18.877881"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:29:18.881156"], ["updated_at", "2021-02-16 08:29:18.881156"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.882876"], ["updated_at", "2021-02-16 08:29:18.882876"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.916115"], ["updated_at", "2021-02-16 08:29:18.916115"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.918121"], ["updated_at", "2021-02-16 08:29:18.918121"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 231], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-16 08:29:18.920542"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 231]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.923805"], ["updated_at", "2021-02-16 08:29:18.923805"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.925476"], ["updated_at", "2021-02-16 08:29:18.925476"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 233], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-16 08:29:18.927928"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 233]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 233], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.931512"], ["updated_at", "2021-02-16 08:29:18.931512"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.933231"], ["updated_at", "2021-02-16 08:29:18.933231"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 235], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-16 08:29:18.935652"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 235]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 235], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.939313"], ["updated_at", "2021-02-16 08:29:18.939313"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.941063"], ["updated_at", "2021-02-16 08:29:18.941063"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:29:18.944424"], ["updated_at", "2021-02-16 08:29:18.944424"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613377758"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.947531"], ["updated_at", "2021-02-16 08:29:18.947531"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["synced_id", 123], ["id", 239], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "multi_applications_accounts"."id" = $4 [["updated_at", "2021-02-16 08:29:18.961358"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 239]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:29:18.964478"], ["updated_at", "2021-02-16 08:29:18.964478"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613550558"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.967242"], ["updated_at", "2021-02-16 08:29:18.967242"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:29:18.970542"], ["updated_at", "2021-02-16 08:29:18.970542"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 241], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["id", 241], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.3ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "multi_applications_accounts"."id" = $5 [["updated_at", "2021-02-16 08:29:18.973208"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 241]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 241], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:18.978052"], ["updated_at", "2021-02-16 08:29:18.978052"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.981811"], ["updated_at", "2021-02-16 08:29:18.981811"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Application Load (0.4ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "client_id"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "client_secret"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:18.997791"], ["updated_at", "2021-02-16 08:29:18.997791"], ["host", "host"], ["client_id", "client_id"], ["client_secret", "client_secret"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:19.001794"], ["updated_at", "2021-02-16 08:29:19.001794"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:19.003607"], ["updated_at", "2021-02-16 08:29:19.003607"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:19.005339"], ["updated_at", "2021-02-16 08:29:19.005339"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:19.007190"], ["updated_at", "2021-02-16 08:29:19.007190"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:19.010918"], ["updated_at", "2021-02-16 08:29:19.010918"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:19.013871"], ["updated_at", "2021-02-16 08:29:19.013871"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test2.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "234"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "567"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:19.016482"], ["updated_at", "2021-02-16 08:29:19.016482"], ["host", "test2.example"], ["client_id", "234"], ["client_secret", "567"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:19.019979"], ["updated_at", "2021-02-16 08:29:19.019979"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:19.021929"], ["updated_at", "2021-02-16 08:29:19.021929"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:19.023804"], ["updated_at", "2021-02-16 08:29:19.023804"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:29:19.025492"], ["updated_at", "2021-02-16 08:29:19.025492"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 5) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 20ms (Views: 5.1ms | ActiveRecord: 0.0ms | Allocations: 2109) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 207) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 225) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 206) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JSON Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 203) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:19.098692"], ["updated_at", "2021-02-16 08:29:19.098692"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.4ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:19.106255"], ["updated_at", "2021-02-16 08:29:19.106255"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "DEF"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:19.114862"], ["updated_at", "2021-02-16 08:29:19.114862"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "TEST.HOST"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:19.123711"], ["updated_at", "2021-02-16 08:29:19.123711"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:19.129595"], ["updated_at", "2021-02-16 08:29:19.129595"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:19.135822"], ["updated_at", "2021-02-16 08:29:19.135822"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "ABC"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:29:19.145714"], ["updated_at", "2021-02-16 08:29:19.145714"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.1ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 1.9ms | Allocations: 269) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 2.1ms | Allocations: 358) Completed 200 OK in 11ms (Views: 4.0ms | ActiveRecord: 0.0ms | Allocations: 2043) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 0.1ms | Allocations: 53) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 0.3ms | Allocations: 139) Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms | Allocations: 433) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/signed_out Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 143) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 123) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:29:19.174089"], ["updated_at", "2021-02-16 08:29:19.174089"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/admin Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 866) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:29:19.178539"], ["updated_at", "2021-02-16 08:29:19.178539"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.7ms | Allocations: 867) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (0.2ms) SELECT COUNT(*) FROM "accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:29:19.183444"], ["updated_at", "2021-02-16 08:29:19.183444"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 873)  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "test.host"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:29:19.190487"], ["updated_at", "2021-02-16 08:29:19.190487"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 954)  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/ Completed 302 Found in 14ms (ActiveRecord: 0.0ms | Allocations: 1396) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/signed_out Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 117) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.2ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 1.5ms | Allocations: 269) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 1.8ms | Allocations: 362) Completed 200 OK in 13ms (Views: 7.9ms | ActiveRecord: 0.0ms | Allocations: 2887) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 0.1ms | Allocations: 53) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 0.3ms | Allocations: 139) Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms | Allocations: 433) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (1.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.9ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (1.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.337338"], ["updated_at", "2021-02-16 08:35:13.337338"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/admin Completed 302 Found in 49ms (ActiveRecord: 16.6ms | Allocations: 10540) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.345237"], ["updated_at", "2021-02-16 08:35:13.345237"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 868) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (2.8ms) SELECT COUNT(*) FROM "multi_applications_accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "test.host"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (1.0ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.368102"], ["updated_at", "2021-02-16 08:35:13.368102"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 12ms (ActiveRecord: 3.1ms | Allocations: 6042)  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (0.2ms) SELECT COUNT(*) FROM "accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.380022"], ["updated_at", "2021-02-16 08:35:13.380022"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 873)  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JSON Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 180) TRANSACTION (0.4ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 3) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms | Allocations: 543) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 260) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 255) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 237) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.7ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.427372"], ["updated_at", "2021-02-16 08:35:13.427372"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.433853"], ["updated_at", "2021-02-16 08:35:13.433853"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 255], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["id", 255], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.3ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "multi_applications_accounts"."id" = $5 [["updated_at", "2021-02-16 08:35:13.437072"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 255]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 255], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.443308"], ["updated_at", "2021-02-16 08:35:13.443308"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613378113"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (2.9ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.6ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.455002"], ["updated_at", "2021-02-16 08:35:13.455002"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["synced_id", 123], ["id", 256], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.3ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "multi_applications_accounts"."id" = $4 [["updated_at", "2021-02-16 08:35:13.479225"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 256]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.484691"], ["updated_at", "2021-02-16 08:35:13.484691"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613550913"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.487727"], ["updated_at", "2021-02-16 08:35:13.487727"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.491302"], ["updated_at", "2021-02-16 08:35:13.491302"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.493162"], ["updated_at", "2021-02-16 08:35:13.493162"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.494915"], ["updated_at", "2021-02-16 08:35:13.494915"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.496670"], ["updated_at", "2021-02-16 08:35:13.496670"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.500569"], ["updated_at", "2021-02-16 08:35:13.500569"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.tesu"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.515875"], ["updated_at", "2021-02-16 08:35:13.515875"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.518800"], ["updated_at", "2021-02-16 08:35:13.518800"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test2.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "234"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "567"], ["LIMIT", 1]] Application Create (0.4ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.522128"], ["updated_at", "2021-02-16 08:35:13.522128"], ["host", "test2.example"], ["client_id", "234"], ["client_secret", "567"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "client_id"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "client_secret"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.527838"], ["updated_at", "2021-02-16 08:35:13.527838"], ["host", "host"], ["client_id", "client_id"], ["client_secret", "client_secret"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.552843"], ["updated_at", "2021-02-16 08:35:13.552843"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.555036"], ["updated_at", "2021-02-16 08:35:13.555036"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.561132"], ["updated_at", "2021-02-16 08:35:13.561132"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.563132"], ["updated_at", "2021-02-16 08:35:13.563132"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.566428"], ["updated_at", "2021-02-16 08:35:13.566428"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.571231"], ["updated_at", "2021-02-16 08:35:13.571231"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.573229"], ["updated_at", "2021-02-16 08:35:13.573229"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.576887"], ["updated_at", "2021-02-16 08:35:13.576887"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.578907"], ["updated_at", "2021-02-16 08:35:13.578907"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.582365"], ["updated_at", "2021-02-16 08:35:13.582365"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.584335"], ["updated_at", "2021-02-16 08:35:13.584335"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.587908"], ["updated_at", "2021-02-16 08:35:13.587908"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.589847"], ["updated_at", "2021-02-16 08:35:13.589847"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 275], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-16 08:35:13.592667"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 275]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.595532"], ["updated_at", "2021-02-16 08:35:13.595532"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.597212"], ["updated_at", "2021-02-16 08:35:13.597212"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["synced_id", 123], ["id", 277], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-16 08:35:13.599764"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 277]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 277], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.626863"], ["updated_at", "2021-02-16 08:35:13.626863"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.628722"], ["updated_at", "2021-02-16 08:35:13.628722"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (6.4ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 279], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-16 08:35:13.637566"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 279]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 279], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.641525"], ["updated_at", "2021-02-16 08:35:13.641525"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.643414"], ["updated_at", "2021-02-16 08:35:13.643414"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.645212"], ["updated_at", "2021-02-16 08:35:13.645212"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.646975"], ["updated_at", "2021-02-16 08:35:13.646975"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.651016"], ["updated_at", "2021-02-16 08:35:13.651016"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.654457"], ["updated_at", "2021-02-16 08:35:13.654457"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.671083"], ["updated_at", "2021-02-16 08:35:13.671083"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.674013"], ["updated_at", "2021-02-16 08:35:13.674013"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.688974"], ["updated_at", "2021-02-16 08:35:13.688974"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.1ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:13.698658"], ["updated_at", "2021-02-16 08:35:13.698658"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.706613"], ["updated_at", "2021-02-16 08:35:13.706613"], ["synced_id", 123], ["host", "example.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.708552"], ["updated_at", "2021-02-16 08:35:13.708552"], ["synced_id", 123], ["host", "test.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "test.host"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.717074"], ["updated_at", "2021-02-16 08:35:13.717074"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 271], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND "accounts"."id" != $1 LIMIT $2 [["id", 271], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5 [["updated_at", "2021-02-16 08:35:13.720049"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 271]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 271], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:13.724805"], ["updated_at", "2021-02-16 08:35:13.724805"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:13.726349"], ["updated_at", "2021-02-16 08:35:13.726349"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:13.727851"], ["updated_at", "2021-02-16 08:35:13.727851"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:13.730808"], ["updated_at", "2021-02-16 08:35:13.730808"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:13.733519"], ["updated_at", "2021-02-16 08:35:13.733519"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:13.735245"], ["updated_at", "2021-02-16 08:35:13.735245"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:13.736773"], ["updated_at", "2021-02-16 08:35:13.736773"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2021-02-16 08:35:13.740118"], ["updated_at", "2021-02-16 08:35:13.740118"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3 [["updated_at", "2021-02-16 08:35:13.741343"], ["synced_id", 0], ["id", 279]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 0], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:13.745687"], ["updated_at", "2021-02-16 08:35:13.745687"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.748490"], ["updated_at", "2021-02-16 08:35:13.748490"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613550913"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.751393"], ["updated_at", "2021-02-16 08:35:13.751393"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613378113"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 282], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-16 08:35:13.765329"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 282]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.768648"], ["updated_at", "2021-02-16 08:35:13.768648"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613378113"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 283], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-16 08:35:13.783842"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 283]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.786769"], ["updated_at", "2021-02-16 08:35:13.786769"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613378113"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.790369"], ["updated_at", "2021-02-16 08:35:13.790369"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:13.794255"], ["updated_at", "2021-02-16 08:35:13.794255"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:13.808858"], ["updated_at", "2021-02-16 08:35:13.808858"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:13.812058"], ["updated_at", "2021-02-16 08:35:13.812058"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.827025"], ["updated_at", "2021-02-16 08:35:13.827025"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.829853"], ["updated_at", "2021-02-16 08:35:13.829853"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (1.4ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.834550"], ["updated_at", "2021-02-16 08:35:13.834550"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.837152"], ["updated_at", "2021-02-16 08:35:13.837152"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.840342"], ["updated_at", "2021-02-16 08:35:13.840342"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.842859"], ["updated_at", "2021-02-16 08:35:13.842859"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.845453"], ["updated_at", "2021-02-16 08:35:13.845453"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:13.847531"], ["updated_at", "2021-02-16 08:35:13.847531"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.850401"], ["updated_at", "2021-02-16 08:35:13.850401"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.851922"], ["updated_at", "2021-02-16 08:35:13.851922"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 298], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:35:13.854030"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 298]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.857187"], ["updated_at", "2021-02-16 08:35:13.857187"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.859090"], ["updated_at", "2021-02-16 08:35:13.859090"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 300], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:35:13.861303"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 300]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.864425"], ["updated_at", "2021-02-16 08:35:13.864425"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.865971"], ["updated_at", "2021-02-16 08:35:13.865971"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 302], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:35:13.868103"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 302]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 302], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.871258"], ["updated_at", "2021-02-16 08:35:13.871258"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:13.872951"], ["updated_at", "2021-02-16 08:35:13.872951"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 304], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:35:13.876008"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 304]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.883872"], ["updated_at", "2021-02-16 08:35:13.883872"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.1ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "DEF"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.893049"], ["updated_at", "2021-02-16 08:35:13.893049"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.898490"], ["updated_at", "2021-02-16 08:35:13.898490"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.904190"], ["updated_at", "2021-02-16 08:35:13.904190"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "ABC"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.913126"], ["updated_at", "2021-02-16 08:35:13.913126"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "TEST.HOST"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:13.921172"], ["updated_at", "2021-02-16 08:35:13.921172"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Application Exists? (3.7ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "client_id"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "client_secret"], ["LIMIT", 1]] Application Create (0.7ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.302375"], ["updated_at", "2021-02-16 08:35:33.302375"], ["host", "host"], ["client_id", "client_id"], ["client_secret", "client_secret"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (2.8ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.8ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.376137"], ["updated_at", "2021-02-16 08:35:33.376137"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.386170"], ["updated_at", "2021-02-16 08:35:33.386170"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.388773"], ["updated_at", "2021-02-16 08:35:33.388773"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.414871"], ["updated_at", "2021-02-16 08:35:33.414871"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.417689"], ["updated_at", "2021-02-16 08:35:33.417689"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.421007"], ["updated_at", "2021-02-16 08:35:33.421007"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Exists? (0.4ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.tesu"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.436751"], ["updated_at", "2021-02-16 08:35:33.436751"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.438702"], ["updated_at", "2021-02-16 08:35:33.438702"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.446079"], ["updated_at", "2021-02-16 08:35:33.446079"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.447931"], ["updated_at", "2021-02-16 08:35:33.447931"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.451275"], ["updated_at", "2021-02-16 08:35:33.451275"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.455230"], ["updated_at", "2021-02-16 08:35:33.455230"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.457058"], ["updated_at", "2021-02-16 08:35:33.457058"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.461249"], ["updated_at", "2021-02-16 08:35:33.461249"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.463477"], ["updated_at", "2021-02-16 08:35:33.463477"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.469260"], ["updated_at", "2021-02-16 08:35:33.469260"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.471025"], ["updated_at", "2021-02-16 08:35:33.471025"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.473988"], ["updated_at", "2021-02-16 08:35:33.473988"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.4ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.475783"], ["updated_at", "2021-02-16 08:35:33.475783"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.5ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.5ms) SELECT 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 [["synced_id", 123], ["id", 304], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.3ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-16 08:35:33.480713"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 304]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.484220"], ["updated_at", "2021-02-16 08:35:33.484220"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.486445"], ["updated_at", "2021-02-16 08:35:33.486445"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 306], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-16 08:35:33.489031"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 306]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 306], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.492581"], ["updated_at", "2021-02-16 08:35:33.492581"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.494673"], ["updated_at", "2021-02-16 08:35:33.494673"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["synced_id", 123], ["id", 308], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-16 08:35:33.497478"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 308]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 308], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.500819"], ["updated_at", "2021-02-16 08:35:33.500819"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.502593"], ["updated_at", "2021-02-16 08:35:33.502593"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.504268"], ["updated_at", "2021-02-16 08:35:33.504268"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.506059"], ["updated_at", "2021-02-16 08:35:33.506059"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.511040"], ["updated_at", "2021-02-16 08:35:33.511040"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.514643"], ["updated_at", "2021-02-16 08:35:33.514643"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test2.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "234"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "567"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.517392"], ["updated_at", "2021-02-16 08:35:33.517392"], ["host", "test2.example"], ["client_id", "234"], ["client_secret", "567"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.520748"], ["updated_at", "2021-02-16 08:35:33.520748"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.522653"], ["updated_at", "2021-02-16 08:35:33.522653"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.524407"], ["updated_at", "2021-02-16 08:35:33.524407"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.526730"], ["updated_at", "2021-02-16 08:35:33.526730"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.531172"], ["updated_at", "2021-02-16 08:35:33.531172"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613378133"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.534103"], ["updated_at", "2021-02-16 08:35:33.534103"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["synced_id", 123], ["id", 319], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "multi_applications_accounts"."id" = $4 [["updated_at", "2021-02-16 08:35:33.550484"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 319]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.553581"], ["updated_at", "2021-02-16 08:35:33.553581"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613550933"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.556284"], ["updated_at", "2021-02-16 08:35:33.556284"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.4ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.560183"], ["updated_at", "2021-02-16 08:35:33.560183"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 321], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["id", 321], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "multi_applications_accounts"."id" = $5 [["updated_at", "2021-02-16 08:35:33.564210"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 321]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 321], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (2.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.7ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:33.623791"], ["updated_at", "2021-02-16 08:35:33.623791"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.634433"], ["updated_at", "2021-02-16 08:35:33.634433"], ["synced_id", 123], ["host", "example.host"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.636347"], ["updated_at", "2021-02-16 08:35:33.636347"], ["synced_id", 123], ["host", "test.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "test.host"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.644852"], ["updated_at", "2021-02-16 08:35:33.644852"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 306], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND "accounts"."id" != $1 LIMIT $2 [["id", 306], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5 [["updated_at", "2021-02-16 08:35:33.647622"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 306]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 306], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:33.650890"], ["updated_at", "2021-02-16 08:35:33.650890"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.653744"], ["updated_at", "2021-02-16 08:35:33.653744"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.656949"], ["updated_at", "2021-02-16 08:35:33.656949"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.661335"], ["updated_at", "2021-02-16 08:35:33.661335"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.664262"], ["updated_at", "2021-02-16 08:35:33.664262"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.667103"], ["updated_at", "2021-02-16 08:35:33.667103"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.669362"], ["updated_at", "2021-02-16 08:35:33.669362"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.671861"], ["updated_at", "2021-02-16 08:35:33.671861"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.674148"], ["updated_at", "2021-02-16 08:35:33.674148"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.677154"], ["updated_at", "2021-02-16 08:35:33.677154"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.679090"], ["updated_at", "2021-02-16 08:35:33.679090"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 317], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:35:33.681447"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 317]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.684348"], ["updated_at", "2021-02-16 08:35:33.684348"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.685904"], ["updated_at", "2021-02-16 08:35:33.685904"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.4ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 319], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:35:33.711680"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 319]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 319], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.715063"], ["updated_at", "2021-02-16 08:35:33.715063"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.716574"], ["updated_at", "2021-02-16 08:35:33.716574"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 321], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:35:33.718662"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 321]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 321], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.721976"], ["updated_at", "2021-02-16 08:35:33.721976"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:35:33.723666"], ["updated_at", "2021-02-16 08:35:33.723666"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 323], ["LIMIT", 1]] Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:35:33.726231"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 323]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:33.729682"], ["updated_at", "2021-02-16 08:35:33.729682"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:33.743943"], ["updated_at", "2021-02-16 08:35:33.743943"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:33.759128"], ["updated_at", "2021-02-16 08:35:33.759128"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.764179"], ["updated_at", "2021-02-16 08:35:33.764179"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:33.766985"], ["updated_at", "2021-02-16 08:35:33.766985"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.769751"], ["updated_at", "2021-02-16 08:35:33.769751"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613378133"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 329], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-16 08:35:33.784086"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 329]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.786863"], ["updated_at", "2021-02-16 08:35:33.786863"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613378133"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.790098"], ["updated_at", "2021-02-16 08:35:33.790098"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613378133"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 331], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-16 08:35:33.803697"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 331]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.806456"], ["updated_at", "2021-02-16 08:35:33.806456"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613550933"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.3ms) SAVEPOINT active_record_1 Account Exists? (0.5ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:33.812738"], ["updated_at", "2021-02-16 08:35:33.812738"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:33.814689"], ["updated_at", "2021-02-16 08:35:33.814689"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:33.816318"], ["updated_at", "2021-02-16 08:35:33.816318"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:33.819686"], ["updated_at", "2021-02-16 08:35:33.819686"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:33.821210"], ["updated_at", "2021-02-16 08:35:33.821210"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:35:33.822687"], ["updated_at", "2021-02-16 08:35:33.822687"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2021-02-16 08:35:33.826015"], ["updated_at", "2021-02-16 08:35:33.826015"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3 [["updated_at", "2021-02-16 08:35:33.827422"], ["synced_id", 0], ["id", 339]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 0], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.833970"], ["updated_at", "2021-02-16 08:35:33.833970"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.840147"], ["updated_at", "2021-02-16 08:35:33.840147"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.846631"], ["updated_at", "2021-02-16 08:35:33.846631"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.1ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "DEF"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.854652"], ["updated_at", "2021-02-16 08:35:33.854652"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "ABC"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.863320"], ["updated_at", "2021-02-16 08:35:33.863320"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "TEST.HOST"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (1.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.872163"], ["updated_at", "2021-02-16 08:35:33.872163"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:35:33.880874"], ["updated_at", "2021-02-16 08:35:33.880874"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.1ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/ Completed 302 Found in 13ms (ActiveRecord: 0.0ms | Allocations: 1382) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/signed_out Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 117) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.910938"], ["updated_at", "2021-02-16 08:35:33.910938"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 868) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.915478"], ["updated_at", "2021-02-16 08:35:33.915478"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/admin Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 865) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "test.host"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.921006"], ["updated_at", "2021-02-16 08:35:33.921006"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.7ms | Allocations: 954)  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (0.2ms) SELECT COUNT(*) FROM "accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:35:33.928378"], ["updated_at", "2021-02-16 08:35:33.928378"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 4ms (ActiveRecord: 0.9ms | Allocations: 873)  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 1.4ms | Allocations: 269) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 1.6ms | Allocations: 362) Completed 200 OK in 10ms (Views: 4.7ms | ActiveRecord: 0.0ms | Allocations: 2352) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 0.1ms | Allocations: 53) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 0.3ms | Allocations: 139) Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms | Allocations: 433) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 3) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.0ms | Allocations: 611) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 237) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JSON Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 115) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 251) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 259) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/signed_out Completed 302 Found in 13ms (ActiveRecord: 0.0ms | Allocations: 1388) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 123) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (1.5ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (6.8ms) INSERT 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" [["created_at", "2021-02-16 08:48:10.648337"], ["updated_at", "2021-02-16 08:48:10.648337"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 43ms (ActiveRecord: 11.4ms | Allocations: 9703) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.8ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:10.662940"], ["updated_at", "2021-02-16 08:48:10.662940"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/admin Completed 302 Found in 4ms (ActiveRecord: 1.6ms | Allocations: 866) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (2.9ms) SELECT COUNT(*) FROM "multi_applications_accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "test.host"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (7.0ms) INSERT 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" [["created_at", "2021-02-16 08:48:10.685406"], ["updated_at", "2021-02-16 08:48:10.685406"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 18ms (ActiveRecord: 9.2ms | Allocations: 6003)  (0.3ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (0.2ms) SELECT COUNT(*) FROM "accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:10.703213"], ["updated_at", "2021-02-16 08:48:10.703213"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 873)  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 1.4ms | Allocations: 269) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 1.6ms | Allocations: 362) Completed 200 OK in 13ms (Views: 7.7ms | ActiveRecord: 0.0ms | Allocations: 2884) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 0.1ms | Allocations: 53) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 0.3ms | Allocations: 139) Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms | Allocations: 436) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2021-02-16 08:48:10.729058"], ["updated_at", "2021-02-16 08:48:10.729058"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3 [["updated_at", "2021-02-16 08:48:10.730554"], ["synced_id", 0], ["id", 346]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 0], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:10.743523"], ["updated_at", "2021-02-16 08:48:10.743523"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:10.746946"], ["updated_at", "2021-02-16 08:48:10.746946"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms)[0m BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:10.751850"], ["updated_at", "2021-02-16 08:48:10.751850"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:10.753620"], ["updated_at", "2021-02-16 08:48:10.753620"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:10.755175"], ["updated_at", "2021-02-16 08:48:10.755175"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:10.759020"], ["updated_at", "2021-02-16 08:48:10.759020"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:10.760814"], ["updated_at", "2021-02-16 08:48:10.760814"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:10.762425"], ["updated_at", "2021-02-16 08:48:10.762425"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:10.766032"], ["updated_at", "2021-02-16 08:48:10.766032"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 355], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND "accounts"."id" != $1 LIMIT $2 [["id", 355], ["LIMIT", 1]] Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5 [["updated_at", "2021-02-16 08:48:10.772330"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 355]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.4ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 355], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:10.778260"], ["updated_at", "2021-02-16 08:48:10.778260"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613378890"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 356], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-16 08:48:10.801409"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 356]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:10.804301"], ["updated_at", "2021-02-16 08:48:10.804301"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613378890"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 357], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-16 08:48:10.818913"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 357]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:10.821928"], ["updated_at", "2021-02-16 08:48:10.821928"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613378890"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:10.829637"], ["updated_at", "2021-02-16 08:48:10.829637"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613551690"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:10.853673"], ["updated_at", "2021-02-16 08:48:10.853673"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:10.856749"], ["updated_at", "2021-02-16 08:48:10.856749"], ["synced_id", 123]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:10.872328"], ["updated_at", "2021-02-16 08:48:10.872328"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:10.876430"], ["updated_at", "2021-02-16 08:48:10.876430"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.4ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:10.894745"], ["updated_at", "2021-02-16 08:48:10.894745"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:10.896667"], ["updated_at", "2021-02-16 08:48:10.896667"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 365], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:48:10.899089"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 365]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:10.901710"], ["updated_at", "2021-02-16 08:48:10.901710"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.1ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:10.903210"], ["updated_at", "2021-02-16 08:48:10.903210"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 367], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:48:10.905624"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 367]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 367], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:10.909537"], ["updated_at", "2021-02-16 08:48:10.909537"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:10.911183"], ["updated_at", "2021-02-16 08:48:10.911183"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 369], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:48:10.913738"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 369]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 369], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:10.917124"], ["updated_at", "2021-02-16 08:48:10.917124"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:10.918673"], ["updated_at", "2021-02-16 08:48:10.918673"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 371], ["LIMIT", 1]] Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:48:10.920866"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 371]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:10.924248"], ["updated_at", "2021-02-16 08:48:10.924248"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:10.927138"], ["updated_at", "2021-02-16 08:48:10.927138"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:10.930208"], ["updated_at", "2021-02-16 08:48:10.930208"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:10.932331"], ["updated_at", "2021-02-16 08:48:10.932331"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:10.934868"], ["updated_at", "2021-02-16 08:48:10.934868"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:10.937001"], ["updated_at", "2021-02-16 08:48:10.937001"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.6ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.5ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:10.940386"], ["updated_at", "2021-02-16 08:48:10.940386"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT 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" [["created_at", "2021-02-16 08:48:10.944863"], ["updated_at", "2021-02-16 08:48:10.944863"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (3.4ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.7ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:10.977417"], ["updated_at", "2021-02-16 08:48:10.977417"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:10.982500"], ["updated_at", "2021-02-16 08:48:10.982500"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613378890"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:10.985379"], ["updated_at", "2021-02-16 08:48:10.985379"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 326], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "multi_applications_accounts"."id" = $4 [["updated_at", "2021-02-16 08:48:10.999180"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 326]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.7ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:11.002702"], ["updated_at", "2021-02-16 08:48:11.002702"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613551691"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.005686"], ["updated_at", "2021-02-16 08:48:11.005686"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:11.009636"], ["updated_at", "2021-02-16 08:48:11.009636"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.012359"], ["updated_at", "2021-02-16 08:48:11.012359"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "client_id"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "client_secret"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.027668"], ["updated_at", "2021-02-16 08:48:11.027668"], ["host", "host"], ["client_id", "client_id"], ["client_secret", "client_secret"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.031445"], ["updated_at", "2021-02-16 08:48:11.031445"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.4ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Exists? (0.4ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" MultiApplicationsAccount Exists? (0.4ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.tesu"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:11.060456"], ["updated_at", "2021-02-16 08:48:11.060456"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 330], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["id", 330], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "multi_applications_accounts"."id" = $5 [["updated_at", "2021-02-16 08:48:11.063577"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 330]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 330], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:11.066890"], ["updated_at", "2021-02-16 08:48:11.066890"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.069431"], ["updated_at", "2021-02-16 08:48:11.069431"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test2.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "234"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "567"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.072222"], ["updated_at", "2021-02-16 08:48:11.072222"], ["host", "test2.example"], ["client_id", "234"], ["client_secret", "567"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:11.076530"], ["updated_at", "2021-02-16 08:48:11.076530"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:11.079037"], ["updated_at", "2021-02-16 08:48:11.079037"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:11.080764"], ["updated_at", "2021-02-16 08:48:11.080764"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:11.082391"], ["updated_at", "2021-02-16 08:48:11.082391"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.086080"], ["updated_at", "2021-02-16 08:48:11.086080"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.087710"], ["updated_at", "2021-02-16 08:48:11.087710"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.090598"], ["updated_at", "2021-02-16 08:48:11.090598"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.092622"], ["updated_at", "2021-02-16 08:48:11.092622"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 338], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-16 08:48:11.095308"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 338]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.098129"], ["updated_at", "2021-02-16 08:48:11.098129"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.099947"], ["updated_at", "2021-02-16 08:48:11.099947"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 340], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-16 08:48:11.102590"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 340]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 340], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.4ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.106160"], ["updated_at", "2021-02-16 08:48:11.106160"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.109076"], ["updated_at", "2021-02-16 08:48:11.109076"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 342], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-16 08:48:11.111849"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 342]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 342], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.115457"], ["updated_at", "2021-02-16 08:48:11.115457"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.117131"], ["updated_at", "2021-02-16 08:48:11.117131"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:11.120341"], ["updated_at", "2021-02-16 08:48:11.120341"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:11.124744"], ["updated_at", "2021-02-16 08:48:11.124744"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.126638"], ["updated_at", "2021-02-16 08:48:11.126638"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:11.130034"], ["updated_at", "2021-02-16 08:48:11.130034"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.131768"], ["updated_at", "2021-02-16 08:48:11.131768"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:11.134661"], ["updated_at", "2021-02-16 08:48:11.134661"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.136236"], ["updated_at", "2021-02-16 08:48:11.136236"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:11.138755"], ["updated_at", "2021-02-16 08:48:11.138755"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:11.140659"], ["updated_at", "2021-02-16 08:48:11.140659"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:11.142515"], ["updated_at", "2021-02-16 08:48:11.142515"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:11.144389"], ["updated_at", "2021-02-16 08:48:11.144389"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:11.147763"], ["updated_at", "2021-02-16 08:48:11.147763"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.150276"], ["updated_at", "2021-02-16 08:48:11.150276"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.1ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:11.153327"], ["updated_at", "2021-02-16 08:48:11.153327"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.8ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.159454"], ["updated_at", "2021-02-16 08:48:11.159454"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.167283"], ["updated_at", "2021-02-16 08:48:11.167283"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "TEST.HOST"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.176150"], ["updated_at", "2021-02-16 08:48:11.176150"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "ABC"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.184733"], ["updated_at", "2021-02-16 08:48:11.184733"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "DEF"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Application Exists? (0.4ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.4ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.194380"], ["updated_at", "2021-02-16 08:48:11.194380"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:11.200773"], ["updated_at", "2021-02-16 08:48:11.200773"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:11.219159"], ["updated_at", "2021-02-16 08:48:11.219159"], ["synced_id", 123], ["host", "example.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:11.221000"], ["updated_at", "2021-02-16 08:48:11.221000"], ["synced_id", 123], ["host", "test.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "test.host"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:11.229394"], ["updated_at", "2021-02-16 08:48:11.229394"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JSON Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 194) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.1ms | Allocations: 3) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 5ms (Views: 4.1ms | ActiveRecord: 0.0ms | Allocations: 549) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 266) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 244) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 254) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 237) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (3.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.7ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:20.698094"], ["updated_at", "2021-02-16 08:48:20.698094"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:20.750866"], ["updated_at", "2021-02-16 08:48:20.750866"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:20.764297"], ["updated_at", "2021-02-16 08:48:20.764297"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "TEST.HOST"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.5ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:20.774134"], ["updated_at", "2021-02-16 08:48:20.774134"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:20.781847"], ["updated_at", "2021-02-16 08:48:20.781847"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "ABC"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:20.790781"], ["updated_at", "2021-02-16 08:48:20.790781"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:20.797539"], ["updated_at", "2021-02-16 08:48:20.797539"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "DEF"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/signed_out Completed 302 Found in 12ms (ActiveRecord: 0.0ms | Allocations: 1380) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 123) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (2.8ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.7ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.7ms) INSERT 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" [["created_at", "2021-02-16 08:48:20.852017"], ["updated_at", "2021-02-16 08:48:20.852017"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 16ms (ActiveRecord: 7.0ms | Allocations: 6538) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:20.857396"], ["updated_at", "2021-02-16 08:48:20.857396"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/admin Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 866) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (3.1ms) SELECT COUNT(*) FROM "multi_applications_accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "test.host"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.8ms) INSERT 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" [["created_at", "2021-02-16 08:48:20.877951"], ["updated_at", "2021-02-16 08:48:20.877951"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 11ms (ActiveRecord: 2.9ms | Allocations: 6002)  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (0.2ms) SELECT COUNT(*) FROM "accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:20.885919"], ["updated_at", "2021-02-16 08:48:20.885919"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 873)  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 1.3ms | Allocations: 269) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 1.5ms | Allocations: 362) Completed 200 OK in 13ms (Views: 7.7ms | ActiveRecord: 0.0ms | Allocations: 2886) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 0.1ms | Allocations: 53) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 0.3ms | Allocations: 139) Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms | Allocations: 433) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:20.914570"], ["updated_at", "2021-02-16 08:48:20.914570"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.7ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:20.923138"], ["updated_at", "2021-02-16 08:48:20.923138"], ["synced_id", 123], ["host", "example.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:20.925284"], ["updated_at", "2021-02-16 08:48:20.925284"], ["synced_id", 123], ["host", "test.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "test.host"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 3) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.0ms | Allocations: 592) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 256) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 272) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 244) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JSON Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 111) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Parameters: {"authenticated"=>{}} Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 236) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:20.976799"], ["updated_at", "2021-02-16 08:48:20.976799"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:20.979254"], ["updated_at", "2021-02-16 08:48:20.979254"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:20.983530"], ["updated_at", "2021-02-16 08:48:20.983530"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:20.985360"], ["updated_at", "2021-02-16 08:48:20.985360"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:20.986945"], ["updated_at", "2021-02-16 08:48:20.986945"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:20.989999"], ["updated_at", "2021-02-16 08:48:20.989999"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:21.012248"], ["updated_at", "2021-02-16 08:48:21.012248"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:21.027432"], ["updated_at", "2021-02-16 08:48:21.027432"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:21.053498"], ["updated_at", "2021-02-16 08:48:21.053498"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613378901"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.4ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 393], ["LIMIT", 1]] Account Update (0.4ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-16 08:48:21.066688"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 393]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:21.070691"], ["updated_at", "2021-02-16 08:48:21.070691"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613378901"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT 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" [["created_at", "2021-02-16 08:48:21.074281"], ["updated_at", "2021-02-16 08:48:21.074281"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613378901"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 395], ["LIMIT", 1]] Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-16 08:48:21.088651"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 395]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:21.092526"], ["updated_at", "2021-02-16 08:48:21.092526"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613551701"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.095564"], ["updated_at", "2021-02-16 08:48:21.095564"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.101460"], ["updated_at", "2021-02-16 08:48:21.101460"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:21.104374"], ["updated_at", "2021-02-16 08:48:21.104374"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.107349"], ["updated_at", "2021-02-16 08:48:21.107349"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:21.109945"], ["updated_at", "2021-02-16 08:48:21.109945"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.112483"], ["updated_at", "2021-02-16 08:48:21.112483"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:21.114724"], ["updated_at", "2021-02-16 08:48:21.114724"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.117549"], ["updated_at", "2021-02-16 08:48:21.117549"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:21.119711"], ["updated_at", "2021-02-16 08:48:21.119711"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.122373"], ["updated_at", "2021-02-16 08:48:21.122373"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.123951"], ["updated_at", "2021-02-16 08:48:21.123951"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.4ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 407], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:48:21.127357"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 407]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 407], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.131247"], ["updated_at", "2021-02-16 08:48:21.131247"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.132985"], ["updated_at", "2021-02-16 08:48:21.132985"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 409], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:48:21.135432"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 409]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 409], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.138817"], ["updated_at", "2021-02-16 08:48:21.138817"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.140413"], ["updated_at", "2021-02-16 08:48:21.140413"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 411], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:48:21.142894"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 411]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.145575"], ["updated_at", "2021-02-16 08:48:21.145575"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.147154"], ["updated_at", "2021-02-16 08:48:21.147154"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 413], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-16 08:48:21.149533"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 413]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.171981"], ["updated_at", "2021-02-16 08:48:21.171981"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 414], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND "accounts"."id" != $1 LIMIT $2 [["id", 414], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5 [["updated_at", "2021-02-16 08:48:21.174668"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 414]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 414], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:21.178043"], ["updated_at", "2021-02-16 08:48:21.178043"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:21.179551"], ["updated_at", "2021-02-16 08:48:21.179551"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-16 08:48:21.181023"], ["updated_at", "2021-02-16 08:48:21.181023"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2021-02-16 08:48:21.184380"], ["updated_at", "2021-02-16 08:48:21.184380"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3 [["updated_at", "2021-02-16 08:48:21.185729"], ["synced_id", 0], ["id", 418]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 0], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:21.190542"], ["updated_at", "2021-02-16 08:48:21.190542"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 364], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["id", 364], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "multi_applications_accounts"."id" = $5 [["updated_at", "2021-02-16 08:48:21.193476"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 364]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 364], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.196860"], ["updated_at", "2021-02-16 08:48:21.196860"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.198500"], ["updated_at", "2021-02-16 08:48:21.198500"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:21.201611"], ["updated_at", "2021-02-16 08:48:21.201611"], ["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"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:21.206114"], ["updated_at", "2021-02-16 08:48:21.206114"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.208013"], ["updated_at", "2021-02-16 08:48:21.208013"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:21.211521"], ["updated_at", "2021-02-16 08:48:21.211521"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.213282"], ["updated_at", "2021-02-16 08:48:21.213282"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:21.216719"], ["updated_at", "2021-02-16 08:48:21.216719"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.218597"], ["updated_at", "2021-02-16 08:48:21.218597"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.221750"], ["updated_at", "2021-02-16 08:48:21.221750"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.223516"], ["updated_at", "2021-02-16 08:48:21.223516"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 374], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.4ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-16 08:48:21.226548"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 374]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.230503"], ["updated_at", "2021-02-16 08:48:21.230503"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.232352"], ["updated_at", "2021-02-16 08:48:21.232352"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 376], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-16 08:48:21.234836"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 376]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 376], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.238046"], ["updated_at", "2021-02-16 08:48:21.238046"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.239751"], ["updated_at", "2021-02-16 08:48:21.239751"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["synced_id", 123], ["id", 378], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.5ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-16 08:48:21.242696"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 378]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 378], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.247097"], ["updated_at", "2021-02-16 08:48:21.247097"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.248934"], ["updated_at", "2021-02-16 08:48:21.248934"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:21.251808"], ["updated_at", "2021-02-16 08:48:21.251808"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "client_id"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "client_secret"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.255600"], ["updated_at", "2021-02-16 08:48:21.255600"], ["host", "host"], ["client_id", "client_id"], ["client_secret", "client_secret"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.259802"], ["updated_at", "2021-02-16 08:48:21.259802"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.261603"], ["updated_at", "2021-02-16 08:48:21.261603"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.263265"], ["updated_at", "2021-02-16 08:48:21.263265"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.264885"], ["updated_at", "2021-02-16 08:48:21.264885"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.268247"], ["updated_at", "2021-02-16 08:48:21.268247"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.tesu"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.275378"], ["updated_at", "2021-02-16 08:48:21.275378"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.278409"], ["updated_at", "2021-02-16 08:48:21.278409"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.281904"], ["updated_at", "2021-02-16 08:48:21.281904"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.283716"], ["updated_at", "2021-02-16 08:48:21.283716"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.285449"], ["updated_at", "2021-02-16 08:48:21.285449"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.287100"], ["updated_at", "2021-02-16 08:48:21.287100"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.290429"], ["updated_at", "2021-02-16 08:48:21.290429"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.293819"], ["updated_at", "2021-02-16 08:48:21.293819"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test2.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "234"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "567"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.296692"], ["updated_at", "2021-02-16 08:48:21.296692"], ["host", "test2.example"], ["client_id", "234"], ["client_secret", "567"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-16 08:48:21.300143"], ["updated_at", "2021-02-16 08:48:21.300143"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.302824"], ["updated_at", "2021-02-16 08:48:21.302824"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-16 08:48:21.318144"], ["updated_at", "2021-02-16 08:48:21.318144"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613551701"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.320868"], ["updated_at", "2021-02-16 08:48:21.320868"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT 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" [["created_at", "2021-02-16 08:48:21.324814"], ["updated_at", "2021-02-16 08:48:21.324814"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613378901"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 Application Exists? (0.5ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-16 08:48:21.328883"], ["updated_at", "2021-02-16 08:48:21.328883"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.1ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.3ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 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 [["synced_id", 123], ["id", 396], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.3ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "multi_applications_accounts"."id" = $4 [["updated_at", "2021-02-16 08:48:21.343944"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 396]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Parameters: {"authenticated"=>{}} TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Parameters: {"authenticated"=>{}} Rendering html template Rendered html template (Duration: 0.1ms | Allocations: 5) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 13549ms (Views: 9.1ms | ActiveRecord: 0.0ms | Allocations: 64207) TRANSACTION (0.4ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Parameters: {"authenticated"=>{}} TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Parameters: {"authenticated"=>{}} Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 5) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 5222ms (Views: 11.2ms | ActiveRecord: 0.0ms | Allocations: 11251) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Parameters: {"authenticated"=>{}} TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JSON No template found for AuthenticatedController#index, rendering head :no_content Completed 204 No Content in 6881ms (ActiveRecord: 0.0ms | Allocations: 13678) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 5) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 14ms (Views: 5.8ms | ActiveRecord: 0.0ms | Allocations: 2675) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 258) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JSON Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 135) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Parameters: {"authenticated"=>{}} Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 254) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 266) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms | Allocations: 244) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JSON Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 9ms (ActiveRecord: 0.0ms | Allocations: 1397) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JSON Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 4898ms (ActiveRecord: 0.0ms | Allocations: 62696) TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Parameters: {"authenticated"=>{}} Rendering html template Rendered html template (Duration: 0.1ms | Allocations: 5) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 1257ms (Views: 9.7ms | ActiveRecord: 0.0ms | Allocations: 58184) TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Parameters: {"authenticated"=>{}} TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JSON Parameters: {"authenticated"=>{}} Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 1999ms (ActiveRecord: 0.0ms | Allocations: 62977) TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.1ms | Allocations: 5) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 103159ms (Views: 13.7ms | ActiveRecord: 0.0ms | Allocations: 64259) TRANSACTION (0.4ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 865ms (Views: 0.6ms | ActiveRecord: 0.0ms | Allocations: 12155) TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JSON Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 611ms (ActiveRecord: 0.0ms | Allocations: 12026) TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JSON Parameters: {"authenticated"=>{}} Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 508ms (ActiveRecord: 0.0ms | Allocations: 12020) TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.1ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 389ms (Views: 0.6ms | ActiveRecord: 0.0ms | Allocations: 12165) TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 373ms (Views: 0.7ms | ActiveRecord: 0.0ms | Allocations: 12218) TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JSON Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 9ms (ActiveRecord: 0.0ms | Allocations: 1393) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as */* Completed 406 Not Acceptable in 0ms (ActiveRecord: 0.0ms | Allocations: 189) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 5) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms | Allocations: 1425) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 259) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 256) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 237) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.2ms) BEGIN Processing by AuthenticatedController#index as JSON Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 18ms (ActiveRecord: 0.0ms | Allocations: 1397) TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.2ms) BEGIN Processing by AuthenticatedController#index as JSON Parameters: {"authenticated"=>{}} Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 2ms (ActiveRecord: 0.0ms | Allocations: 123) TRANSACTION (0.4ms) ROLLBACK TRANSACTION (0.2ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.1ms | Allocations: 5) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 15ms (Views: 12.6ms | ActiveRecord: 0.0ms | Allocations: 1430) TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.2ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 237) TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.2ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 2ms (Views: 0.8ms | ActiveRecord: 0.0ms | Allocations: 251) TRANSACTION (0.5ms) ROLLBACK TRANSACTION (0.3ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 2ms (Views: 0.6ms | ActiveRecord: 0.0ms | Allocations: 259) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (2.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (7.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.368505"], ["updated_at", "2021-02-17 15:31:35.368505"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Application Load (0.4ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.7ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "TEST.HOST"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.432534"], ["updated_at", "2021-02-17 15:31:35.432534"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.438511"], ["updated_at", "2021-02-17 15:31:35.438511"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "ABC"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.4ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.447937"], ["updated_at", "2021-02-17 15:31:35.447937"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.455597"], ["updated_at", "2021-02-17 15:31:35.455597"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "DEF"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.465856"], ["updated_at", "2021-02-17 15:31:35.465856"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Completed 500 Internal Server Error in 12ms (ActiveRecord: 0.0ms | Allocations: 1429) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms | Allocations: 188) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JSON Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms | Allocations: 183) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as */* Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms | Allocations: 186) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN Processing by AuthenticatedController#index as JS Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms | Allocations: 171) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms | Allocations: 186) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (10.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (1.0ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.534206"], ["updated_at", "2021-02-17 15:31:35.534206"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.538596"], ["updated_at", "2021-02-17 15:31:35.538596"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test2.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "234"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "567"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.541339"], ["updated_at", "2021-02-17 15:31:35.541339"], ["host", "test2.example"], ["client_id", "234"], ["client_secret", "567"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.7ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.547624"], ["updated_at", "2021-02-17 15:31:35.547624"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.550807"], ["updated_at", "2021-02-17 15:31:35.550807"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.556487"], ["updated_at", "2021-02-17 15:31:35.556487"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.559225"], ["updated_at", "2021-02-17 15:31:35.559225"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.3ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:31:35.586108"], ["updated_at", "2021-02-17 15:31:35.586108"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 400], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["id", 400], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.3ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "multi_applications_accounts"."id" = $5 [["updated_at", "2021-02-17 15:31:35.595452"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 400]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 400], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "client_id"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "client_secret"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.600650"], ["updated_at", "2021-02-17 15:31:35.600650"], ["host", "host"], ["client_id", "client_id"], ["client_secret", "client_secret"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.626145"], ["updated_at", "2021-02-17 15:31:35.626145"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.627991"], ["updated_at", "2021-02-17 15:31:35.627991"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.629840"], ["updated_at", "2021-02-17 15:31:35.629840"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.631561"], ["updated_at", "2021-02-17 15:31:35.631561"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:31:35.637054"], ["updated_at", "2021-02-17 15:31:35.637054"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613489495"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.639748"], ["updated_at", "2021-02-17 15:31:35.639748"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 405], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "multi_applications_accounts"."id" = $4 [["updated_at", "2021-02-17 15:31:35.654115"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 405]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:31:35.657111"], ["updated_at", "2021-02-17 15:31:35.657111"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613662295"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.659846"], ["updated_at", "2021-02-17 15:31:35.659846"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.663362"], ["updated_at", "2021-02-17 15:31:35.663362"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.665219"], ["updated_at", "2021-02-17 15:31:35.665219"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.667201"], ["updated_at", "2021-02-17 15:31:35.667201"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.669089"], ["updated_at", "2021-02-17 15:31:35.669089"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:31:35.672515"], ["updated_at", "2021-02-17 15:31:35.672515"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.675659"], ["updated_at", "2021-02-17 15:31:35.675659"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.677365"], ["updated_at", "2021-02-17 15:31:35.677365"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 412], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-17 15:31:35.680392"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 412]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.685388"], ["updated_at", "2021-02-17 15:31:35.685388"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.687259"], ["updated_at", "2021-02-17 15:31:35.687259"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 414], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-17 15:31:35.690105"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 414]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 414], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.693500"], ["updated_at", "2021-02-17 15:31:35.693500"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.695483"], ["updated_at", "2021-02-17 15:31:35.695483"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 416], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-17 15:31:35.698540"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 416]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 416], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.702086"], ["updated_at", "2021-02-17 15:31:35.702086"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.703857"], ["updated_at", "2021-02-17 15:31:35.703857"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:31:35.706892"], ["updated_at", "2021-02-17 15:31:35.706892"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT 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" [["created_at", "2021-02-17 15:31:35.711061"], ["updated_at", "2021-02-17 15:31:35.711061"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.713255"], ["updated_at", "2021-02-17 15:31:35.713255"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:31:35.717036"], ["updated_at", "2021-02-17 15:31:35.717036"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.718797"], ["updated_at", "2021-02-17 15:31:35.718797"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:31:35.722021"], ["updated_at", "2021-02-17 15:31:35.722021"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.723798"], ["updated_at", "2021-02-17 15:31:35.723798"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.726477"], ["updated_at", "2021-02-17 15:31:35.726477"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.728529"], ["updated_at", "2021-02-17 15:31:35.728529"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.736107"], ["updated_at", "2021-02-17 15:31:35.736107"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.tesu"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.796790"], ["updated_at", "2021-02-17 15:31:35.796790"], ["synced_id", 123], ["host", "example.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.798597"], ["updated_at", "2021-02-17 15:31:35.798597"], ["synced_id", 123], ["host", "test.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "test.host"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (2.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (5.8ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:31:35.817064"], ["updated_at", "2021-02-17 15:31:35.817064"], ["synced_id", 123]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.837099"], ["updated_at", "2021-02-17 15:31:35.837099"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.1ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 1.5ms | Allocations: 269) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 1.7ms | Allocations: 362) Completed 200 OK in 12ms (Views: 5.5ms | ActiveRecord: 0.0ms | Allocations: 2392) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 0.1ms | Allocations: 53) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 0.3ms | Allocations: 139) Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms | Allocations: 433) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.7ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:31:35.859866"], ["updated_at", "2021-02-17 15:31:35.859866"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 4ms (ActiveRecord: 1.3ms | Allocations: 910) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:31:35.864631"], ["updated_at", "2021-02-17 15:31:35.864631"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/admin Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 865) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "test.host"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:31:35.872909"], ["updated_at", "2021-02-17 15:31:35.872909"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.7ms | Allocations: 954)  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (0.1ms) SELECT COUNT(*) FROM "accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT 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" [["created_at", "2021-02-17 15:31:35.879697"], ["updated_at", "2021-02-17 15:31:35.879697"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.9ms | Allocations: 873)  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 118) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/signed_out Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 117) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:31:35.888462"], ["updated_at", "2021-02-17 15:31:35.888462"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:31:35.892368"], ["updated_at", "2021-02-17 15:31:35.892368"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:31:35.893970"], ["updated_at", "2021-02-17 15:31:35.893970"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:31:35.895779"], ["updated_at", "2021-02-17 15:31:35.895779"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:31:35.899033"], ["updated_at", "2021-02-17 15:31:35.899033"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:31:35.901744"], ["updated_at", "2021-02-17 15:31:35.901744"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:31:35.916166"], ["updated_at", "2021-02-17 15:31:35.916166"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:31:35.930314"], ["updated_at", "2021-02-17 15:31:35.930314"], ["synced_id", 123]] TRANSACTION (0.8ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2021-02-17 15:31:35.934945"], ["updated_at", "2021-02-17 15:31:35.934945"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3 [["updated_at", "2021-02-17 15:31:35.936202"], ["synced_id", 0], ["id", 431]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 0], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.940700"], ["updated_at", "2021-02-17 15:31:35.940700"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.942214"], ["updated_at", "2021-02-17 15:31:35.942214"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 433], ["LIMIT", 1]] Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-17 15:31:35.944686"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 433]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.947627"], ["updated_at", "2021-02-17 15:31:35.947627"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.949376"], ["updated_at", "2021-02-17 15:31:35.949376"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 435], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-17 15:31:35.951876"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 435]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 435], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.955030"], ["updated_at", "2021-02-17 15:31:35.955030"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.956561"], ["updated_at", "2021-02-17 15:31:35.956561"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 437], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-17 15:31:35.958776"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 437]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 437], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.962121"], ["updated_at", "2021-02-17 15:31:35.962121"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.963687"], ["updated_at", "2021-02-17 15:31:35.963687"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 439], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-17 15:31:35.966319"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 439]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.969194"], ["updated_at", "2021-02-17 15:31:35.969194"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:31:35.971779"], ["updated_at", "2021-02-17 15:31:35.971779"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.974695"], ["updated_at", "2021-02-17 15:31:35.974695"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:31:35.976721"], ["updated_at", "2021-02-17 15:31:35.976721"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.979479"], ["updated_at", "2021-02-17 15:31:35.979479"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:31:35.981679"], ["updated_at", "2021-02-17 15:31:35.981679"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:31:35.984325"], ["updated_at", "2021-02-17 15:31:35.984325"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:31:35.986689"], ["updated_at", "2021-02-17 15:31:35.986689"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.989308"], ["updated_at", "2021-02-17 15:31:35.989308"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 448], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND "accounts"."id" != $1 LIMIT $2 [["id", 448], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5 [["updated_at", "2021-02-17 15:31:35.991559"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 448]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 448], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:31:35.994536"], ["updated_at", "2021-02-17 15:31:35.994536"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:31:35.997315"], ["updated_at", "2021-02-17 15:31:35.997315"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:31:35.998927"], ["updated_at", "2021-02-17 15:31:35.998927"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:31:36.000552"], ["updated_at", "2021-02-17 15:31:36.000552"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:31:36.003635"], ["updated_at", "2021-02-17 15:31:36.003635"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613662296"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:31:36.006205"], ["updated_at", "2021-02-17 15:31:36.006205"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613489496"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 454], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-17 15:31:36.019798"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 454]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:31:36.022604"], ["updated_at", "2021-02-17 15:31:36.022604"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613489496"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 455], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-17 15:31:36.035944"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 455]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:31:36.038674"], ["updated_at", "2021-02-17 15:31:36.038674"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613489496"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (12.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (1.0ms) INSERT 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" [["created_at", "2021-02-17 15:32:34.895111"], ["updated_at", "2021-02-17 15:32:34.895111"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613662354"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (5.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.6ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:34.911136"], ["updated_at", "2021-02-17 15:32:34.911136"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:32:34.952757"], ["updated_at", "2021-02-17 15:32:34.952757"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613489554"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:34.955849"], ["updated_at", "2021-02-17 15:32:34.955849"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.3ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 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 [["synced_id", 123], ["id", 434], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.3ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "multi_applications_accounts"."id" = $4 [["updated_at", "2021-02-17 15:32:34.980773"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 434]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:34.984400"], ["updated_at", "2021-02-17 15:32:34.984400"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:34.986279"], ["updated_at", "2021-02-17 15:32:34.986279"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:34.988178"], ["updated_at", "2021-02-17 15:32:34.988178"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:34.990343"], ["updated_at", "2021-02-17 15:32:34.990343"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:34.994575"], ["updated_at", "2021-02-17 15:32:34.994575"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:34.997217"], ["updated_at", "2021-02-17 15:32:34.997217"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test2.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "234"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "567"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:34.999703"], ["updated_at", "2021-02-17 15:32:34.999703"], ["host", "test2.example"], ["client_id", "234"], ["client_secret", "567"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:32:35.002805"], ["updated_at", "2021-02-17 15:32:35.002805"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 440], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["id", 440], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "multi_applications_accounts"."id" = $5 [["updated_at", "2021-02-17 15:32:35.012959"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 440]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 440], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "client_id"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "client_secret"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.017448"], ["updated_at", "2021-02-17 15:32:35.017448"], ["host", "host"], ["client_id", "client_id"], ["client_secret", "client_secret"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "host"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" IS NULL AND "multi_applications_accounts"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT 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" [["created_at", "2021-02-17 15:32:35.040714"], ["updated_at", "2021-02-17 15:32:35.040714"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.044921"], ["updated_at", "2021-02-17 15:32:35.044921"], ["synced_id", 1], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.046807"], ["updated_at", "2021-02-17 15:32:35.046807"], ["synced_id", 2], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 1], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.048550"], ["updated_at", "2021-02-17 15:32:35.048550"], ["synced_id", 1], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 2], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.050307"], ["updated_at", "2021-02-17 15:32:35.050307"], ["synced_id", 2], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "example2.test"], ["synced_id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.053609"], ["updated_at", "2021-02-17 15:32:35.053609"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.3ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.057367"], ["updated_at", "2021-02-17 15:32:35.057367"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.4ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.example"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.074543"], ["updated_at", "2021-02-17 15:32:35.074543"], ["synced_id", 123], ["host", "test.example"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.077432"], ["updated_at", "2021-02-17 15:32:35.077432"], ["host", "test.example"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.example"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.081403"], ["updated_at", "2021-02-17 15:32:35.081403"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.tesu"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.099051"], ["updated_at", "2021-02-17 15:32:35.099051"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.101108"], ["updated_at", "2021-02-17 15:32:35.101108"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["synced_id", 123], ["id", 449], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.3ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-17 15:32:35.104373"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 449]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.110790"], ["updated_at", "2021-02-17 15:32:35.110790"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.112621"], ["updated_at", "2021-02-17 15:32:35.112621"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 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 [["synced_id", 123], ["id", 451], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-17 15:32:35.115704"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 451]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 451], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.119105"], ["updated_at", "2021-02-17 15:32:35.119105"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.120858"], ["updated_at", "2021-02-17 15:32:35.120858"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.3ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 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 [["synced_id", 123], ["id", 453], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Update (0.2ms) UPDATE "multi_applications_accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "multi_applications_accounts"."id" = $6 [["updated_at", "2021-02-17 15:32:35.124002"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 453]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."id" = $1 LIMIT $2 [["id", 453], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.127575"], ["updated_at", "2021-02-17 15:32:35.127575"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.129305"], ["updated_at", "2021-02-17 15:32:35.129305"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:32:35.132323"], ["updated_at", "2021-02-17 15:32:35.132323"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:32:35.136309"], ["updated_at", "2021-02-17 15:32:35.136309"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (1.0ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.138459"], ["updated_at", "2021-02-17 15:32:35.138459"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:32:35.145259"], ["updated_at", "2021-02-17 15:32:35.145259"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.147131"], ["updated_at", "2021-02-17 15:32:35.147131"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "example3.test"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example3.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:32:35.150243"], ["updated_at", "2021-02-17 15:32:35.150243"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.151965"], ["updated_at", "2021-02-17 15:32:35.151965"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.3ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.5ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.155082"], ["updated_at", "2021-02-17 15:32:35.155082"], ["provider", "bookingsync"], ["synced_id", 123], ["host", "example.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 456], ["host", "example2.test"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "provider", "synced_id", "host") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.157510"], ["updated_at", "2021-02-17 15:32:35.157510"], ["provider", "bookingsync"], ["synced_id", 456], ["host", "example2.test"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.172999"], ["updated_at", "2021-02-17 15:32:35.172999"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "TEST.HOST"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.182423"], ["updated_at", "2021-02-17 15:32:35.182423"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.9ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.188793"], ["updated_at", "2021-02-17 15:32:35.188793"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "DEF"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.3ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.201538"], ["updated_at", "2021-02-17 15:32:35.201538"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.208320"], ["updated_at", "2021-02-17 15:32:35.208320"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" IS NULL LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" IS NULL LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.213867"], ["updated_at", "2021-02-17 15:32:35.213867"], ["host", "test.host"], ["client_id", "abc"], ["client_secret", "def"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.1ms) SELECT "applications".* FROM "applications" ORDER BY "applications"."id" ASC LIMIT $1 [["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "abc"], ["LIMIT", 1]] Application Exists? (0.1ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "test.host"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "ABC"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "def"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.2ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 1.5ms | Allocations: 269) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 1.7ms | Allocations: 362) Completed 200 OK in 23ms (Views: 9.1ms | ActiveRecord: 0.0ms | Allocations: 4117) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#failure as HTML Rendering layout layouts/application.html.erb Rendering /Users/sineed/apps/bookingsync/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/sineed/apps/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (Duration: 0.1ms | Allocations: 53) Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary. Rendered layout layouts/application.html.erb (Duration: 0.3ms | Allocations: 139) Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms | Allocations: 436) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (9.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.8ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.6ms) INSERT 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" [["created_at", "2021-02-17 15:32:35.328434"], ["updated_at", "2021-02-17 15:32:35.328434"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 23ms (ActiveRecord: 13.5ms | Allocations: 6308) TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:32:35.334384"], ["updated_at", "2021-02-17 15:32:35.334384"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/admin Completed 302 Found in 3ms (ActiveRecord: 0.7ms | Allocations: 866) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} MultiApplicationsAccount Load (0.1ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."provider" = $2 AND "multi_applications_accounts"."synced_id" = $3 LIMIT $4 [["host", "test.host"], ["provider", "bookingsync"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:32:35.343438"], ["updated_at", "2021-02-17 15:32:35.343438"], ["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"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 954)  (0.2ms) SELECT COUNT(*) FROM "multi_applications_accounts" MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" ORDER BY "multi_applications_accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN  (0.2ms) SELECT COUNT(*) FROM "accounts" Processing by SessionsController#create as HTML Parameters: {"provider"=>"bookingsync"} Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:32:35.350742"], ["updated_at", "2021-02-17 15:32:35.350742"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 873)  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" DESC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/signed_out Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 118) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by SessionsController#destroy as HTML Redirected to http://test.host/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 117) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:32:35.361328"], ["updated_at", "2021-02-17 15:32:35.361328"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:32:35.362959"], ["updated_at", "2021-02-17 15:32:35.362959"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:32:35.364400"], ["updated_at", "2021-02-17 15:32:35.364400"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 1], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:32:35.367577"], ["updated_at", "2021-02-17 15:32:35.367577"], ["synced_id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 2], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:32:35.369091"], ["updated_at", "2021-02-17 15:32:35.369091"], ["synced_id", 2]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:32:35.370544"], ["updated_at", "2021-02-17 15:32:35.370544"], ["synced_id", 3]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 3], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.375955"], ["updated_at", "2021-02-17 15:32:35.375955"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:32:35.378791"], ["updated_at", "2021-02-17 15:32:35.378791"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613489555"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 467], ["LIMIT", 1]] Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-17 15:32:35.393989"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 467]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:32:35.397724"], ["updated_at", "2021-02-17 15:32:35.397724"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613489555"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:32:35.401253"], ["updated_at", "2021-02-17 15:32:35.401253"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613489555"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 469], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3 WHERE "accounts"."id" = $4 [["updated_at", "2021-02-17 15:32:35.415212"], ["oauth_access_token", "refreshed_token"], ["oauth_expires_at", nil], ["id", 469]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:32:35.417909"], ["updated_at", "2021-02-17 15:32:35.417909"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1613662355"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1 [["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.420421"], ["updated_at", "2021-02-17 15:32:35.420421"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 471], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND "accounts"."id" != $1 LIMIT $2 [["id", 471], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5 [["updated_at", "2021-02-17 15:32:35.423517"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 471]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 471], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.427408"], ["updated_at", "2021-02-17 15:32:35.427408"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.429246"], ["updated_at", "2021-02-17 15:32:35.429246"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 473], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-17 15:32:35.431595"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 473]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.434570"], ["updated_at", "2021-02-17 15:32:35.434570"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.436138"], ["updated_at", "2021-02-17 15:32:35.436138"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 475], ["LIMIT", 1]] Account Update (0.3ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-17 15:32:35.438519"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 475]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.442782"], ["updated_at", "2021-02-17 15:32:35.442782"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.444399"], ["updated_at", "2021-02-17 15:32:35.444399"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 477], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-17 15:32:35.446639"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 477]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 477], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.449580"], ["updated_at", "2021-02-17 15:32:35.449580"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.1ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.451001"], ["updated_at", "2021-02-17 15:32:35.451001"], ["provider", "bookingsync"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."id" != $2 LIMIT $3 [["synced_id", 123], ["id", 479], ["LIMIT", 1]] Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "name" = $2, "oauth_access_token" = $3, "oauth_refresh_token" = $4, "oauth_expires_at" = $5 WHERE "accounts"."id" = $6 [["updated_at", "2021-02-17 15:32:35.452996"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["id", 479]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2 [["id", 479], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.2ms) SAVEPOINT active_record_1 Account Exists? (0.4ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.3ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.457463"], ["updated_at", "2021-02-17 15:32:35.457463"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:32:35.460725"], ["updated_at", "2021-02-17 15:32:35.460725"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "accounts" TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.463679"], ["updated_at", "2021-02-17 15:32:35.463679"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:32:35.465714"], ["updated_at", "2021-02-17 15:32:35.465714"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.468184"], ["updated_at", "2021-02-17 15:32:35.468184"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:32:35.470201"], ["updated_at", "2021-02-17 15:32:35.470201"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 456], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.473328"], ["updated_at", "2021-02-17 15:32:35.473328"], ["provider", "bookingsync"], ["synced_id", 456]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3 [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT 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" [["created_at", "2021-02-17 15:32:35.475675"], ["updated_at", "2021-02-17 15:32:35.475675"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:32:35.478295"], ["updated_at", "2021-02-17 15:32:35.478295"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:32:35.480703"], ["updated_at", "2021-02-17 15:32:35.480703"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:32:35.495649"], ["updated_at", "2021-02-17 15:32:35.495649"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.2ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:32:35.511879"], ["updated_at", "2021-02-17 15:32:35.511879"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:32:35.515290"], ["updated_at", "2021-02-17 15:32:35.515290"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1 [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2021-02-17 15:32:35.517973"], ["updated_at", "2021-02-17 15:32:35.517973"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Update (0.2ms) UPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3 [["updated_at", "2021-02-17 15:32:35.519114"], ["synced_id", 0], ["id", 493]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 0], ["LIMIT", 1]] TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Account Exists? (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] Account Create (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at", "synced_id") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2021-02-17 15:32:35.529447"], ["updated_at", "2021-02-17 15:32:35.529447"], ["synced_id", 123]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2 [["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "example.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.2ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.536475"], ["updated_at", "2021-02-17 15:32:35.536475"], ["synced_id", 123], ["host", "example.host"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 MultiApplicationsAccount Exists? (0.2ms) SELECT 1 AS one FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."synced_id" = $1 AND "multi_applications_accounts"."host" = $2 LIMIT $3 [["synced_id", 123], ["host", "test.host"], ["LIMIT", 1]] MultiApplicationsAccount Create (0.3ms) INSERT INTO "multi_applications_accounts" ("created_at", "updated_at", "synced_id", "host") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2021-02-17 15:32:35.538351"], ["updated_at", "2021-02-17 15:32:35.538351"], ["synced_id", 123], ["host", "test.host"]] TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 MultiApplicationsAccount Load (0.2ms) SELECT "multi_applications_accounts".* FROM "multi_applications_accounts" WHERE "multi_applications_accounts"."host" = $1 AND "multi_applications_accounts"."synced_id" = $2 LIMIT $3 [["host", "test.host"], ["synced_id", 123], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) SAVEPOINT active_record_1 Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_id" = $1 LIMIT $2 [["client_id", "123"], ["LIMIT", 1]] Application Exists? (0.2ms) SELECT 1 AS one FROM "applications" WHERE "applications"."client_secret" = $1 LIMIT $2 [["client_secret", "456"], ["LIMIT", 1]] Application Create (0.2ms) INSERT INTO "applications" ("created_at", "updated_at", "host", "client_id", "client_secret") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2021-02-17 15:32:35.548476"], ["updated_at", "2021-02-17 15:32:35.548476"], ["host", "example.test"], ["client_id", "123"], ["client_secret", "456"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 Application Load (0.2ms) SELECT "applications".* FROM "applications" WHERE "applications"."host" = $1 LIMIT $2 [["host", "example.test"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 3) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 4ms (Views: 3.6ms | ActiveRecord: 0.0ms | Allocations: 598) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as HTML Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 259) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JSON Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 133) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as API_JSON Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.3ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms | Allocations: 271) TRANSACTION (0.2ms) ROLLBACK TRANSACTION (0.1ms) BEGIN Processing by AuthenticatedController#index as JS Rendering html template Rendered html template (Duration: 0.0ms | Allocations: 2) Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 249) TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK TRANSACTION (0.1ms) BEGIN TRANSACTION (0.1ms) ROLLBACK