bookingsync-engine 5.1.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/views/sessions/failure.html.erb +3 -1
- data/lib/bookingsync-engine.rb +3 -0
- data/lib/bookingsync/engine/auth_helpers.rb +38 -16
- data/lib/bookingsync/engine/models/account.rb +9 -3
- data/lib/bookingsync/engine/models/multi_applications_account.rb +9 -3
- data/lib/bookingsync/engine/version.rb +1 -1
- data/spec/controllers/authenticated_controller_spec.rb +36 -12
- data/spec/dummy/config/initializers/bookingsync-engine.rb +8 -0
- data/spec/dummy/db/migrate/20190623220013_add_custom_booking_sync_key_id_to_accounts.rb +5 -0
- data/spec/dummy/db/migrate/20190623220132_add_custom_booking_sync_key_id_to_multi_applications_accounts.rb +5 -0
- data/spec/dummy/db/schema.rb +3 -1
- data/spec/dummy/log/development.log +2 -263
- data/spec/dummy/log/test.log +9359 -67231
- data/spec/fixtures/accounts.yml +2 -0
- data/spec/models/account_spec.rb +11 -0
- data/spec/models/multi_application_account_spec.rb +12 -0
- metadata +37 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76d677891a37b6bf242cc2ecdccac253d00e74d980c4c674f1e4e258a23c27aa
|
4
|
+
data.tar.gz: 6bbe344b51c76817b5f91e5db0196a8ff651a8ed668c15e8c24f809357fe7568
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0105eb59ada39b9121ad1aad63e72f7c8f9d1d717ef9cfa85ad5189b9aedf06aa61bc165265289ca55e783546ce2713f720fe26d900116b3cbe5f9d84a921587
|
7
|
+
data.tar.gz: 850bbffb9e6233f2c15009073a463ecfed670bb46db08a5b62afd5abdd8dcb5df0eee57f580872a1603cc84f897dcd4997d2d7e09c8361b384d63a2535b54640
|
data/lib/bookingsync-engine.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require "repost"
|
2
|
+
|
1
3
|
module BookingSync::Engine::AuthHelpers
|
2
4
|
extend ActiveSupport::Concern
|
3
5
|
|
@@ -16,7 +18,7 @@ module BookingSync::Engine::AuthHelpers
|
|
16
18
|
return if session[:account_id].nil?
|
17
19
|
|
18
20
|
@current_account ||=
|
19
|
-
::BookingSyncEngine.account_model.
|
21
|
+
::BookingSyncEngine.account_model.find_by_host_and_bookingsync_id_key(request.host, session[:account_id])
|
20
22
|
end
|
21
23
|
|
22
24
|
# Callback after account is authorized.
|
@@ -25,7 +27,7 @@ module BookingSync::Engine::AuthHelpers
|
|
25
27
|
#
|
26
28
|
# @param account [Account] the just authorized account
|
27
29
|
def account_authorized(account)
|
28
|
-
session[:account_id] = account.
|
30
|
+
session[:account_id] = account.public_send(BookingSyncEngine.bookingsync_id_key).to_s
|
29
31
|
end
|
30
32
|
|
31
33
|
# Clear authorization if the account passed from the BookingSync app store
|
@@ -58,20 +60,32 @@ module BookingSync::Engine::AuthHelpers
|
|
58
60
|
|
59
61
|
# Request a new authorization.
|
60
62
|
def request_authorization!
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
63
|
+
respond_to do |format|
|
64
|
+
format.html do
|
65
|
+
if request.xhr?
|
66
|
+
request_authorization_for_xhr!
|
67
|
+
elsif BookingSync::Engine.embedded
|
68
|
+
request_authorization_for_embedded!
|
69
|
+
else
|
70
|
+
request_authorization_for_standalone!
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
format.json do
|
75
|
+
head :unauthorized
|
76
|
+
end
|
77
|
+
|
78
|
+
format.api_json do
|
79
|
+
head :unauthorized
|
80
|
+
end
|
67
81
|
end
|
68
82
|
end
|
69
83
|
|
70
84
|
# Request a new authorization for Ajax requests.
|
71
85
|
#
|
72
|
-
# Renders the new
|
86
|
+
# Renders the new auto submit form with 401 Unauthorized status by default.
|
73
87
|
def request_authorization_for_xhr!
|
74
|
-
render
|
88
|
+
render html: auto_submit_form_html, status: :unauthorized
|
75
89
|
end
|
76
90
|
|
77
91
|
# Request a new authorization for Embedded Apps.
|
@@ -79,23 +93,23 @@ module BookingSync::Engine::AuthHelpers
|
|
79
93
|
# Load the new authorization path using Javascript by default.
|
80
94
|
def request_authorization_for_embedded!
|
81
95
|
allow_bookingsync_iframe
|
82
|
-
render html:
|
83
|
-
"'#{new_authorization_path}';</script>").html_safe
|
96
|
+
render html: auto_submit_form_html
|
84
97
|
end
|
85
98
|
|
86
99
|
# Request a new authorization for Standalone Apps.
|
87
100
|
#
|
88
101
|
# Redirects to new authorization path by default.
|
89
102
|
def request_authorization_for_standalone!
|
90
|
-
|
103
|
+
render html: auto_submit_form_html
|
91
104
|
end
|
92
105
|
|
93
|
-
# Path
|
106
|
+
# Path which will be used in POST request to start a new
|
94
107
|
# Authorization process.
|
95
108
|
#
|
96
|
-
# Default to /auth/bookingsync
|
109
|
+
# Default to /auth/bookingsync
|
110
|
+
NEW_AUTHORIZATION_URL = "/auth/bookingsync".freeze
|
97
111
|
def new_authorization_path
|
98
|
-
|
112
|
+
NEW_AUTHORIZATION_URL
|
99
113
|
end
|
100
114
|
|
101
115
|
def new_authorization_url
|
@@ -141,4 +155,12 @@ module BookingSync::Engine::AuthHelpers
|
|
141
155
|
def store_bookingsync_account_id # :nodoc:
|
142
156
|
session[:_bookingsync_account_id] = params.delete(:_bookingsync_account_id)
|
143
157
|
end
|
158
|
+
|
159
|
+
def auto_submit_form_html
|
160
|
+
Repost::Senpai.perform(
|
161
|
+
new_authorization_path,
|
162
|
+
params: { account_id: session[:_bookingsync_account_id] },
|
163
|
+
options: { authenticity_token: Rack::Protection::AuthenticityToken.token(session) }
|
164
|
+
).html_safe
|
165
|
+
end
|
144
166
|
end
|
@@ -3,12 +3,12 @@ module BookingSync::Engine::Models::Account
|
|
3
3
|
include BookingSync::Engine::Models::BaseAccount
|
4
4
|
|
5
5
|
included do
|
6
|
-
validates
|
6
|
+
validates BookingSyncEngine.bookingsync_id_key, uniqueness: true
|
7
7
|
end
|
8
8
|
|
9
9
|
module ClassMethods
|
10
10
|
def from_omniauth(auth, _host)
|
11
|
-
account = find_or_initialize_by(
|
11
|
+
account = find_or_initialize_by(BookingSyncEngine.bookingsync_id_key => auth.uid, provider: auth.provider)
|
12
12
|
|
13
13
|
account.tap do |account|
|
14
14
|
account.name = auth.info.business_name
|
@@ -17,8 +17,14 @@ module BookingSync::Engine::Models::Account
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
+
def find_by_host_and_bookingsync_id_key(_host, bookingsync_id)
|
21
|
+
find_by(BookingSyncEngine.bookingsync_id_key => bookingsync_id)
|
22
|
+
end
|
23
|
+
|
24
|
+
# DEPRECATED: Please use find_by_host_and_bookingsync_id_key instead.
|
20
25
|
def find_by_host_and_synced_id(_host, synced_id)
|
21
|
-
|
26
|
+
warn("DEPRECATED: find_by_host_and_synced_id is deprecated, use #find_by_host_and_bookingsync_id_key instead. It will be removed with the release of version 6 of this gem. Called from #{Gem.location_of_caller.join(":")}")
|
27
|
+
find_by_host_and_bookingsync_id_key(nil, synced_id)
|
22
28
|
end
|
23
29
|
end
|
24
30
|
|
@@ -3,7 +3,7 @@ module BookingSync::Engine::Models::MultiApplicationsAccount
|
|
3
3
|
include BookingSync::Engine::Models::BaseAccount
|
4
4
|
|
5
5
|
included do
|
6
|
-
validates
|
6
|
+
validates BookingSyncEngine.bookingsync_id_key, uniqueness: { scope: :host }
|
7
7
|
end
|
8
8
|
|
9
9
|
module ClassMethods
|
@@ -13,7 +13,7 @@ module BookingSync::Engine::Models::MultiApplicationsAccount
|
|
13
13
|
"multi application support"
|
14
14
|
end
|
15
15
|
|
16
|
-
account = find_or_initialize_by(host: host,
|
16
|
+
account = find_or_initialize_by(host: host, provider: auth.provider, BookingSyncEngine.bookingsync_id_key => auth.uid)
|
17
17
|
|
18
18
|
account.tap do |account|
|
19
19
|
account.name = auth.info.business_name
|
@@ -22,8 +22,14 @@ module BookingSync::Engine::Models::MultiApplicationsAccount
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
+
def find_by_host_and_bookingsync_id_key(host, bookingsync_id)
|
26
|
+
find_by(host: host, BookingSyncEngine.bookingsync_id_key => bookingsync_id)
|
27
|
+
end
|
28
|
+
|
29
|
+
# DEPRECATED: Please use find_by_host_and_bookingsync_id_key instead.
|
25
30
|
def find_by_host_and_synced_id(host, synced_id)
|
26
|
-
|
31
|
+
warn("DEPRECATED: find_by_host_and_synced_id is deprecated, use #find_by_host_and_bookingsync_id_key instead. It will be removed with the release of version 5 of this gem. Called from #{Gem.location_of_caller.join(":")}")
|
32
|
+
find_by_host_and_bookingsync_id_key(host, synced_id)
|
27
33
|
end
|
28
34
|
end
|
29
35
|
|
@@ -1,15 +1,19 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
RSpec.describe AuthenticatedController, type: :controller do
|
4
|
+
before do
|
5
|
+
Mime::Type.register "application/vnd.api+json", :api_json
|
6
|
+
end
|
7
|
+
|
4
8
|
describe "GET index" do
|
5
9
|
context "when engine is embedded" do
|
6
10
|
before { BookingSync::Engine.embedded! }
|
7
11
|
|
8
|
-
it "
|
12
|
+
it "renders autosubmitted form" do
|
9
13
|
get :index
|
10
14
|
expect(response.status).to eq(200)
|
11
|
-
expect(response.body).to
|
12
|
-
|
15
|
+
expect(response.body).to include("action='/auth/bookingsync' method='post'")
|
16
|
+
expect(response.body).to include("<input type='hidden' name='account_id' value=''>")
|
13
17
|
expect(response.header["Content-Type"]).to include("text/html")
|
14
18
|
end
|
15
19
|
end
|
@@ -17,12 +21,11 @@ RSpec.describe AuthenticatedController, type: :controller do
|
|
17
21
|
context "when engine is standalone" do
|
18
22
|
before { BookingSync::Engine.standalone! }
|
19
23
|
|
20
|
-
it "
|
24
|
+
it "renders autosubmitted form" do
|
21
25
|
get :index
|
22
|
-
expect(response.status).to eq(
|
23
|
-
expect(response.
|
24
|
-
expect(response.body).to
|
25
|
-
"<html><body>You are being <a href=\"http://test.host/auth/bookingsync/?account_id=\">redirected</a>.</body></html>")
|
26
|
+
expect(response.status).to eq(200)
|
27
|
+
expect(response.body).to include("action='/auth/bookingsync' method='post'")
|
28
|
+
expect(response.body).to include("<input type='hidden' name='account_id' value=''>")
|
26
29
|
end
|
27
30
|
end
|
28
31
|
end
|
@@ -31,20 +34,41 @@ RSpec.describe AuthenticatedController, type: :controller do
|
|
31
34
|
context "when engine is embedded" do
|
32
35
|
before { BookingSync::Engine.embedded! }
|
33
36
|
|
34
|
-
it "renders
|
37
|
+
it "renders autosubmitted form" do
|
35
38
|
get :index, xhr: true
|
36
39
|
expect(response.status).to eq(401)
|
37
|
-
expect(response.body).to
|
40
|
+
expect(response.body).to include("action='/auth/bookingsync' method='post'")
|
41
|
+
expect(response.body).to include("<input type='hidden' name='account_id' value=''>")
|
38
42
|
end
|
39
43
|
end
|
40
44
|
|
41
45
|
context "when engine is standalone" do
|
42
46
|
before { BookingSync::Engine.standalone! }
|
43
47
|
|
44
|
-
it "renders
|
48
|
+
it "renders autosubmitted form" do
|
45
49
|
get :index, xhr: true
|
46
50
|
expect(response.status).to eq(401)
|
47
|
-
expect(response.body).to
|
51
|
+
expect(response.body).to include("action='/auth/bookingsync' method='post'")
|
52
|
+
expect(response.body).to include("<input type='hidden' name='account_id' value=''>")
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
describe "API request" do
|
58
|
+
it "returns 401 without response body" do
|
59
|
+
get :index, format: :json
|
60
|
+
expect(response.status).to eq(401)
|
61
|
+
expect(response.body).to eq("")
|
62
|
+
end
|
63
|
+
|
64
|
+
context "with vnd.api+json content type" do
|
65
|
+
it "returns 401 without response body" do
|
66
|
+
request.headers["CONTENT_TYPE"] = "application/vnd.api+json"
|
67
|
+
request.headers["ACCEPT"] = "application/vnd.api+json"
|
68
|
+
|
69
|
+
get :index
|
70
|
+
expect(response.status).to eq(401)
|
71
|
+
expect(response.body).to eq("")
|
48
72
|
end
|
49
73
|
end
|
50
74
|
end
|
@@ -1,3 +1,11 @@
|
|
1
|
+
# temporarily change default to make sure initializer override works great
|
2
|
+
BookingSyncEngine.module_eval do
|
3
|
+
self.bookingsync_id_key = :customized_key
|
4
|
+
end
|
5
|
+
|
6
|
+
# and now override to fix breaking specs
|
1
7
|
BookingSyncEngine.setup do |setup|
|
2
8
|
setup.multi_app_model = -> { ::MultiApplicationsAccount }
|
9
|
+
|
10
|
+
setup.bookingsync_id_key = :synced_id
|
3
11
|
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema.define(version:
|
13
|
+
ActiveRecord::Schema.define(version: 2019_06_23_220132) do
|
14
14
|
|
15
15
|
# These are extensions that must be enabled in order to support this database
|
16
16
|
enable_extension "plpgsql"
|
@@ -24,6 +24,7 @@ ActiveRecord::Schema.define(version: 2018_11_30_063104) do
|
|
24
24
|
t.string "oauth_access_token"
|
25
25
|
t.string "oauth_refresh_token"
|
26
26
|
t.string "oauth_expires_at"
|
27
|
+
t.integer "customized_key"
|
27
28
|
t.index ["synced_id"], name: "index_accounts_on_synced_id"
|
28
29
|
end
|
29
30
|
|
@@ -48,6 +49,7 @@ ActiveRecord::Schema.define(version: 2018_11_30_063104) do
|
|
48
49
|
t.string "oauth_refresh_token"
|
49
50
|
t.string "oauth_expires_at"
|
50
51
|
t.string "host", null: false
|
52
|
+
t.integer "customized_key"
|
51
53
|
t.index ["host", "synced_id"], name: "index_multi_applications_accounts_on_host_and_synced_id", unique: true
|
52
54
|
t.index ["host"], name: "index_multi_applications_accounts_on_host"
|
53
55
|
t.index ["synced_id"], name: "index_multi_applications_accounts_on_synced_id"
|
@@ -1,263 +1,2 @@
|
|
1
|
-
[1m[35m (
|
2
|
-
[1m[35m (
|
3
|
-
[1m[35m (13.4ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
4
|
-
[1m[35m (3.1ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
5
|
-
[1m[35m (0.4ms)[0m [1m[34mSELECT pg_try_advisory_lock(4021716121895623095)[0m
|
6
|
-
[1m[35m (0.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
7
|
-
Migrating to CreateAccounts (20140522110326)
|
8
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
9
|
-
[1m[35m (5.4ms)[0m [1m[35mCREATE TABLE "accounts" ("id" bigserial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
10
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.5ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20140522110326"]]
|
11
|
-
[1m[35m (0.7ms)[0m [1m[35mCOMMIT[0m
|
12
|
-
Migrating to AddOAuthFieldsToAccounts (20140522110454)
|
13
|
-
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
14
|
-
[1m[35m (2.5ms)[0m [1m[35mALTER TABLE "accounts" ADD "provider" character varying[0m
|
15
|
-
[1m[35m (0.3ms)[0m [1m[35mALTER TABLE "accounts" ADD "synced_id" integer[0m
|
16
|
-
[1m[35m (1.4ms)[0m [1m[35mCREATE INDEX "index_accounts_on_synced_id" ON "accounts" ("synced_id")[0m
|
17
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "accounts" ADD "name" character varying[0m
|
18
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "accounts" ADD "oauth_access_token" character varying[0m
|
19
|
-
[1m[35m (0.4ms)[0m [1m[35mALTER TABLE "accounts" ADD "oauth_refresh_token" character varying[0m
|
20
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "accounts" ADD "oauth_expires_at" character varying[0m
|
21
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20140522110454"]]
|
22
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
23
|
-
Migrating to CreateMultiApplicationsAccounts (20181130062531)
|
24
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
25
|
-
[1m[35m (1.7ms)[0m [1m[35mCREATE TABLE "multi_applications_accounts" ("id" bigserial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
26
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.5ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20181130062531"]]
|
27
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
28
|
-
Migrating to AddOAuthFieldsToMultiApplicationsAccounts (20181130062650)
|
29
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
30
|
-
[1m[35m (1.2ms)[0m [1m[35mALTER TABLE "multi_applications_accounts" ADD "provider" character varying[0m
|
31
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "multi_applications_accounts" ADD "synced_id" integer[0m
|
32
|
-
[1m[35m (1.1ms)[0m [1m[35mCREATE INDEX "index_multi_applications_accounts_on_synced_id" ON "multi_applications_accounts" ("synced_id")[0m
|
33
|
-
[1m[35m (0.3ms)[0m [1m[35mALTER TABLE "multi_applications_accounts" ADD "name" character varying[0m
|
34
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "multi_applications_accounts" ADD "oauth_access_token" character varying[0m
|
35
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "multi_applications_accounts" ADD "oauth_refresh_token" character varying[0m
|
36
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "multi_applications_accounts" ADD "oauth_expires_at" character varying[0m
|
37
|
-
[1m[35m (0.5ms)[0m [1m[35mALTER TABLE "multi_applications_accounts" ADD "host" character varying NOT NULL[0m
|
38
|
-
[1m[35m (1.1ms)[0m [1m[35mCREATE INDEX "index_multi_applications_accounts_on_host" ON "multi_applications_accounts" ("host")[0m
|
39
|
-
[1m[35m (0.9ms)[0m [1m[35mCREATE UNIQUE INDEX "index_multi_applications_accounts_on_host_and_synced_id" ON "multi_applications_accounts" ("host", "synced_id")[0m
|
40
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20181130062650"]]
|
41
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
42
|
-
Migrating to CreateApplications (20181130063056)
|
43
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
44
|
-
[1m[35m (6.2ms)[0m [1m[35mCREATE TABLE "applications" ("id" bigserial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
45
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.8ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20181130063056"]]
|
46
|
-
[1m[35m (0.7ms)[0m [1m[35mCOMMIT[0m
|
47
|
-
Migrating to AddCredentialsFieldsToApplications (20181130063104)
|
48
|
-
[1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
|
49
|
-
[1m[35m (5.1ms)[0m [1m[35mALTER TABLE "applications" ADD "host" character varying NOT NULL[0m
|
50
|
-
[1m[35m (1.2ms)[0m [1m[35mCREATE UNIQUE INDEX "index_applications_on_host" ON "applications" ("host")[0m
|
51
|
-
[1m[35m (0.4ms)[0m [1m[35mALTER TABLE "applications" ADD "client_id" text NOT NULL[0m
|
52
|
-
[1m[35m (1.4ms)[0m [1m[35mCREATE UNIQUE INDEX "index_applications_on_client_id" ON "applications" ("client_id")[0m
|
53
|
-
[1m[35m (0.3ms)[0m [1m[35mALTER TABLE "applications" ADD "client_secret" text NOT NULL[0m
|
54
|
-
[1m[35m (6.0ms)[0m [1m[35mCREATE UNIQUE INDEX "index_applications_on_client_secret" ON "applications" ("client_secret")[0m
|
55
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20181130063104"]]
|
56
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
57
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
58
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
59
|
-
[1m[36mActiveRecord::InternalMetadata Create (1.1ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", "2019-06-21 14:35:31.093625"], ["updated_at", "2019-06-21 14:35:31.093625"]]
|
60
|
-
[1m[35m (0.7ms)[0m [1m[35mCOMMIT[0m
|
61
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(4021716121895623095)[0m
|
62
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
63
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(4021716121895623095)[0m
|
64
|
-
[1m[35m (0.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
65
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
66
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
67
|
-
[1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
|
68
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(4021716121895623095)[0m
|
69
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
70
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
71
|
-
[1m[35m (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
72
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
73
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
74
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
75
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
76
|
-
[1m[35mSQL (3.4ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
77
|
-
[1m[35m (5.9ms)[0m [1m[35mDROP TABLE IF EXISTS "accounts" CASCADE[0m
|
78
|
-
[1m[35m (4.9ms)[0m [1m[35mCREATE 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)[0m
|
79
|
-
[1m[35m (1.3ms)[0m [1m[35mCREATE INDEX "index_accounts_on_synced_id" ON "accounts" ("synced_id")[0m
|
80
|
-
[1m[35m (2.8ms)[0m [1m[35mDROP TABLE IF EXISTS "applications" CASCADE[0m
|
81
|
-
[1m[35m (4.6ms)[0m [1m[35mCREATE 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)[0m
|
82
|
-
[1m[35m (1.3ms)[0m [1m[35mCREATE UNIQUE INDEX "index_applications_on_client_id" ON "applications" ("client_id")[0m
|
83
|
-
[1m[35m (1.6ms)[0m [1m[35mCREATE UNIQUE INDEX "index_applications_on_client_secret" ON "applications" ("client_secret")[0m
|
84
|
-
[1m[35m (6.3ms)[0m [1m[35mCREATE UNIQUE INDEX "index_applications_on_host" ON "applications" ("host")[0m
|
85
|
-
[1m[35m (3.8ms)[0m [1m[35mDROP TABLE IF EXISTS "multi_applications_accounts" CASCADE[0m
|
86
|
-
[1m[35m (10.4ms)[0m [1m[35mCREATE 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)[0m
|
87
|
-
[1m[35m (4.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_multi_applications_accounts_on_host_and_synced_id" ON "multi_applications_accounts" ("host", "synced_id")[0m
|
88
|
-
[1m[35m (2.4ms)[0m [1m[35mCREATE INDEX "index_multi_applications_accounts_on_host" ON "multi_applications_accounts" ("host")[0m
|
89
|
-
[1m[35m (1.2ms)[0m [1m[35mCREATE INDEX "index_multi_applications_accounts_on_synced_id" ON "multi_applications_accounts" ("synced_id")[0m
|
90
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
91
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.6ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
92
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
93
|
-
[1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
|
94
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
95
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
96
|
-
[1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
|
97
|
-
[1m[35mSQL (1.8ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
98
|
-
[1m[35m (0.2ms)[0m [1m[35mDROP TABLE IF EXISTS "accounts" CASCADE[0m
|
99
|
-
[1m[35m (40.9ms)[0m [1m[35mCREATE 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)[0m
|
100
|
-
[1m[35m (1.7ms)[0m [1m[35mCREATE INDEX "index_accounts_on_synced_id" ON "accounts" ("synced_id")[0m
|
101
|
-
[1m[35m (0.2ms)[0m [1m[35mDROP TABLE IF EXISTS "applications" CASCADE[0m
|
102
|
-
[1m[35m (4.8ms)[0m [1m[35mCREATE 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)[0m
|
103
|
-
[1m[35m (1.3ms)[0m [1m[35mCREATE UNIQUE INDEX "index_applications_on_client_id" ON "applications" ("client_id")[0m
|
104
|
-
[1m[35m (1.9ms)[0m [1m[35mCREATE UNIQUE INDEX "index_applications_on_client_secret" ON "applications" ("client_secret")[0m
|
105
|
-
[1m[35m (7.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_applications_on_host" ON "applications" ("host")[0m
|
106
|
-
[1m[35m (0.2ms)[0m [1m[35mDROP TABLE IF EXISTS "multi_applications_accounts" CASCADE[0m
|
107
|
-
[1m[35m (4.9ms)[0m [1m[35mCREATE 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)[0m
|
108
|
-
[1m[35m (1.3ms)[0m [1m[35mCREATE UNIQUE INDEX "index_multi_applications_accounts_on_host_and_synced_id" ON "multi_applications_accounts" ("host", "synced_id")[0m
|
109
|
-
[1m[35m (1.2ms)[0m [1m[35mCREATE INDEX "index_multi_applications_accounts_on_host" ON "multi_applications_accounts" ("host")[0m
|
110
|
-
[1m[35m (7.6ms)[0m [1m[35mCREATE INDEX "index_multi_applications_accounts_on_synced_id" ON "multi_applications_accounts" ("synced_id")[0m
|
111
|
-
[1m[35m (8.0ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
112
|
-
[1m[35m (1.4ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
113
|
-
[1m[35m (0.8ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20181130063104)[0m
|
114
|
-
[1m[35m (0.5ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES
|
115
|
-
(20140522110454),
|
116
|
-
(20181130062650),
|
117
|
-
(20181130063056),
|
118
|
-
(20140522110326),
|
119
|
-
(20181130062531);
|
120
|
-
|
121
|
-
[0m
|
122
|
-
[1m[35m (3.9ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
123
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
124
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
125
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.5ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", "2019-06-21 14:40:15.884905"], ["updated_at", "2019-06-21 14:40:15.884905"]]
|
126
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
127
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
128
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
129
|
-
[1m[36mActiveRecord::InternalMetadata Update (0.5ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3[0m [["value", "test"], ["updated_at", "2019-06-21 14:40:15.889023"], ["key", "environment"]]
|
130
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
131
|
-
[1m[35m (1.1ms)[0m [1m[34mSELECT pg_try_advisory_lock(4021716121895623095)[0m
|
132
|
-
[1m[35m (1.4ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
133
|
-
Migrating to AddCustomBookingSyncKeyIdToAccounts (20190623220013)
|
134
|
-
[1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
|
135
|
-
[1m[35m (5.0ms)[0m [1m[35mALTER TABLE "accounts" ADD "customized_key" integer[0m
|
136
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20190623220013"]]
|
137
|
-
[1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
|
138
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.8ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
139
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
140
|
-
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
141
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(4021716121895623095)[0m
|
142
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
143
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_try_advisory_lock(4021716121895623095)[0m
|
144
|
-
[1m[35m (0.7ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
145
|
-
Migrating to AddCustomBookingSyncKeyIdToMultiApplicationsAccounts (20190623220132)
|
146
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
147
|
-
[1m[35m (0.6ms)[0m [1m[35mALTER TABLE "multi_applications_accounts" ADD "customized_key" integer[0m
|
148
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20190623220132"]]
|
149
|
-
[1m[35m (2.0ms)[0m [1m[35mCOMMIT[0m
|
150
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
151
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
152
|
-
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
153
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(4021716121895623095)[0m
|
154
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
155
|
-
[1m[35m (2.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
156
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
157
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
158
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(4021716121895623095)[0m
|
159
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
160
|
-
Migrating to AddCustomBookingSyncKeyIdToMultiApplicationsAccounts (20190623220132)
|
161
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
162
|
-
[1m[35m (3.1ms)[0m [1m[35mALTER TABLE "multi_applications_accounts" DROP COLUMN "customized_key"[0m
|
163
|
-
[1m[36mActiveRecord::SchemaMigration Destroy (0.5ms)[0m [1m[31mDELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1[0m [["version", "20190623220132"]]
|
164
|
-
[1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
|
165
|
-
Migrating to AddCustomBookingSyncKeyIdToAccounts (20190623220013)
|
166
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
167
|
-
[1m[35m (0.5ms)[0m [1m[35mALTER TABLE "accounts" DROP COLUMN "customized_key"[0m
|
168
|
-
[1m[36mActiveRecord::SchemaMigration Destroy (2.0ms)[0m [1m[31mDELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1[0m [["version", "20190623220013"]]
|
169
|
-
[1m[35m (1.3ms)[0m [1m[35mCOMMIT[0m
|
170
|
-
[1m[35m (0.8ms)[0m [1m[34mSELECT pg_advisory_unlock(4021716121895623095)[0m
|
171
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
172
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(4021716121895623095)[0m
|
173
|
-
[1m[35m (0.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
174
|
-
Migrating to AddCustomBookingSyncKeyIdToAccounts (20190623220013)
|
175
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
176
|
-
[1m[35m (0.7ms)[0m [1m[35mALTER TABLE "accounts" ADD "customized_key" integer[0m
|
177
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20190623220013"]]
|
178
|
-
[1m[35m (2.1ms)[0m [1m[35mCOMMIT[0m
|
179
|
-
Migrating to AddCustomBookingSyncKeyIdToMultiApplicationsAccounts (20190623220132)
|
180
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
181
|
-
[1m[35m (0.3ms)[0m [1m[35mALTER TABLE "multi_applications_accounts" ADD "customized_key" integer[0m
|
182
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20190623220132"]]
|
183
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
184
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.7ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
185
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
186
|
-
[1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
|
187
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(4021716121895623095)[0m
|
188
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
189
|
-
[1m[35m (1175.0ms)[0m [1m[35mCREATE DATABASE "bookingsync_engine_development" ENCODING = 'unicode'[0m
|
190
|
-
[1m[35m (825.0ms)[0m [1m[35mCREATE DATABASE "bookingsync_engine_test" ENCODING = 'unicode'[0m
|
191
|
-
[1m[35mSQL (12.2ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
192
|
-
[1m[35m (6.9ms)[0m [1m[35mDROP TABLE IF EXISTS "accounts" CASCADE[0m
|
193
|
-
[1m[35m (162.5ms)[0m [1m[35mCREATE 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)[0m
|
194
|
-
[1m[35m (2.5ms)[0m [1m[35mCREATE INDEX "index_accounts_on_synced_id" ON "accounts" ("synced_id")[0m
|
195
|
-
[1m[35m (0.2ms)[0m [1m[35mDROP TABLE IF EXISTS "applications" CASCADE[0m
|
196
|
-
[1m[35m (5.7ms)[0m [1m[35mCREATE 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)[0m
|
197
|
-
[1m[35m (10.9ms)[0m [1m[35mCREATE UNIQUE INDEX "index_applications_on_client_id" ON "applications" ("client_id")[0m
|
198
|
-
[1m[35m (2.3ms)[0m [1m[35mCREATE UNIQUE INDEX "index_applications_on_client_secret" ON "applications" ("client_secret")[0m
|
199
|
-
[1m[35m (2.2ms)[0m [1m[35mCREATE UNIQUE INDEX "index_applications_on_host" ON "applications" ("host")[0m
|
200
|
-
[1m[35m (0.2ms)[0m [1m[35mDROP TABLE IF EXISTS "multi_applications_accounts" CASCADE[0m
|
201
|
-
[1m[35m (10.8ms)[0m [1m[35mCREATE 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)[0m
|
202
|
-
[1m[35m (3.5ms)[0m [1m[35mCREATE UNIQUE INDEX "index_multi_applications_accounts_on_host_and_synced_id" ON "multi_applications_accounts" ("host", "synced_id")[0m
|
203
|
-
[1m[35m (5.2ms)[0m [1m[35mCREATE INDEX "index_multi_applications_accounts_on_host" ON "multi_applications_accounts" ("host")[0m
|
204
|
-
[1m[35m (2.9ms)[0m [1m[35mCREATE INDEX "index_multi_applications_accounts_on_synced_id" ON "multi_applications_accounts" ("synced_id")[0m
|
205
|
-
[1m[35m (5.9ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
206
|
-
[1m[35m (2.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
207
|
-
[1m[35m (1.7ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20181130063104)[0m
|
208
|
-
[1m[35m (0.5ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES
|
209
|
-
(20140522110326),
|
210
|
-
(20140522110454),
|
211
|
-
(20181130062531),
|
212
|
-
(20181130062650),
|
213
|
-
(20181130063056);
|
214
|
-
|
215
|
-
[0m
|
216
|
-
[1m[35m (5.4ms)[0m [1m[35mCREATE 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)[0m
|
217
|
-
[1m[36mActiveRecord::InternalMetadata Load (1.7ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
218
|
-
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
219
|
-
[1m[36mActiveRecord::InternalMetadata Create (1.2ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", "2020-03-25 16:17:19.875839"], ["updated_at", "2020-03-25 16:17:19.875839"]]
|
220
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
221
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
222
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "schema_sha1"], ["LIMIT", 1]]
|
223
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
224
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.2ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "schema_sha1"], ["value", "755874218b611b67fce72928f68517992e40a98e"], ["created_at", "2020-03-25 16:17:19.882233"], ["updated_at", "2020-03-25 16:17:19.882233"]]
|
225
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
226
|
-
[1m[35mSQL (3.5ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
227
|
-
[1m[35m (0.2ms)[0m [1m[35mDROP TABLE IF EXISTS "accounts" CASCADE[0m
|
228
|
-
[1m[35m (64.5ms)[0m [1m[35mCREATE 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)[0m
|
229
|
-
[1m[35m (3.8ms)[0m [1m[35mCREATE INDEX "index_accounts_on_synced_id" ON "accounts" ("synced_id")[0m
|
230
|
-
[1m[35m (0.2ms)[0m [1m[35mDROP TABLE IF EXISTS "applications" CASCADE[0m
|
231
|
-
[1m[35m (6.5ms)[0m [1m[35mCREATE 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)[0m
|
232
|
-
[1m[35m (12.6ms)[0m [1m[35mCREATE UNIQUE INDEX "index_applications_on_client_id" ON "applications" ("client_id")[0m
|
233
|
-
[1m[35m (2.5ms)[0m [1m[35mCREATE UNIQUE INDEX "index_applications_on_client_secret" ON "applications" ("client_secret")[0m
|
234
|
-
[1m[35m (2.6ms)[0m [1m[35mCREATE UNIQUE INDEX "index_applications_on_host" ON "applications" ("host")[0m
|
235
|
-
[1m[35m (0.2ms)[0m [1m[35mDROP TABLE IF EXISTS "multi_applications_accounts" CASCADE[0m
|
236
|
-
[1m[35m (6.3ms)[0m [1m[35mCREATE 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)[0m
|
237
|
-
[1m[35m (2.4ms)[0m [1m[35mCREATE UNIQUE INDEX "index_multi_applications_accounts_on_host_and_synced_id" ON "multi_applications_accounts" ("host", "synced_id")[0m
|
238
|
-
[1m[35m (11.9ms)[0m [1m[35mCREATE INDEX "index_multi_applications_accounts_on_host" ON "multi_applications_accounts" ("host")[0m
|
239
|
-
[1m[35m (14.4ms)[0m [1m[35mCREATE INDEX "index_multi_applications_accounts_on_synced_id" ON "multi_applications_accounts" ("synced_id")[0m
|
240
|
-
[1m[35m (9.9ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
241
|
-
[1m[35m (2.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
242
|
-
[1m[35m (5.0ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20181130063104)[0m
|
243
|
-
[1m[35m (6.0ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES
|
244
|
-
(20140522110326),
|
245
|
-
(20140522110454),
|
246
|
-
(20181130062531),
|
247
|
-
(20181130062650),
|
248
|
-
(20181130063056);
|
249
|
-
|
250
|
-
[0m
|
251
|
-
[1m[35m (10.2ms)[0m [1m[35mCREATE 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)[0m
|
252
|
-
[1m[36mActiveRecord::InternalMetadata Load (1.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
253
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
254
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.8ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", "2020-03-25 16:17:20.128664"], ["updated_at", "2020-03-25 16:17:20.128664"]]
|
255
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
256
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
257
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
258
|
-
[1m[36mActiveRecord::InternalMetadata Update (1.3ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3[0m [["value", "test"], ["updated_at", "2020-03-25 16:17:20.132397"], ["key", "environment"]]
|
259
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
260
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "schema_sha1"], ["LIMIT", 1]]
|
261
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
262
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.2ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "schema_sha1"], ["value", "755874218b611b67fce72928f68517992e40a98e"], ["created_at", "2020-03-25 16:17:20.136794"], ["updated_at", "2020-03-25 16:17:20.136794"]]
|
263
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
1
|
+
[1m[35m (550.3ms)[0m [1m[35mCREATE DATABASE "bookingsync_engine_development" ENCODING = 'unicode'[0m
|
2
|
+
[1m[35m (356.4ms)[0m [1m[35mCREATE DATABASE "bookingsync_engine_test" ENCODING = 'unicode'[0m
|