journaled 2.1.0 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +23 -0
- data/app/controllers/concerns/journaled/actor.rb +1 -0
- data/app/models/concerns/journaled/changes.rb +5 -5
- data/app/models/journaled/change.rb +4 -1
- data/app/models/journaled/change_definition.rb +1 -0
- data/app/models/journaled/change_writer.rb +2 -1
- data/app/models/journaled/delivery.rb +10 -7
- data/app/models/journaled/event.rb +5 -2
- data/app/models/journaled/writer.rb +6 -6
- data/lib/journaled.rb +6 -3
- data/lib/journaled/enqueue.rb +13 -0
- data/lib/journaled/relation_change_protection.rb +10 -2
- data/lib/journaled/version.rb +1 -1
- data/spec/lib/journaled_spec.rb +10 -9
- data/spec/models/concerns/journaled/changes_spec.rb +12 -0
- data/spec/models/database_change_protection_spec.rb +8 -1
- data/spec/models/journaled/change_writer_spec.rb +26 -21
- data/spec/models/journaled/delivery_spec.rb +38 -5
- data/spec/models/journaled/event_spec.rb +24 -17
- data/spec/models/journaled/json_schema_model/validator_spec.rb +3 -3
- data/spec/models/journaled/writer_spec.rb +26 -13
- metadata +50 -21
- data/lib/journaled/job_priority.rb +0 -5
- data/spec/dummy/log/development.log +0 -120
- data/spec/dummy/log/test.log +0 -15304
@@ -47,14 +47,14 @@ RSpec.describe Journaled::Delivery do
|
|
47
47
|
{
|
48
48
|
assumed_role_user: {
|
49
49
|
arn: 'iam-role-arn-for-assuming-kinesis-access',
|
50
|
-
assumed_role_id: "ARO123EXAMPLE123:Bob"
|
50
|
+
assumed_role_id: "ARO123EXAMPLE123:Bob",
|
51
51
|
},
|
52
52
|
credentials: {
|
53
53
|
access_key_id: "AKIAIOSFODNN7EXAMPLE",
|
54
54
|
secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
|
55
55
|
session_token: "EXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI",
|
56
|
-
expiration: Time.zone.parse("2011-07-15T23:28:33.359Z")
|
57
|
-
}
|
56
|
+
expiration: Time.zone.parse("2011-07-15T23:28:33.359Z"),
|
57
|
+
},
|
58
58
|
}
|
59
59
|
end
|
60
60
|
|
@@ -64,7 +64,7 @@ RSpec.describe Journaled::Delivery do
|
|
64
64
|
expect(Aws::AssumeRoleCredentials).to have_received(:new).with(
|
65
65
|
client: aws_sts_client,
|
66
66
|
role_arn: "iam-role-arn-for-assuming-kinesis-access",
|
67
|
-
role_session_name: "JournaledAssumeRoleAccess"
|
67
|
+
role_session_name: "JournaledAssumeRoleAccess",
|
68
68
|
)
|
69
69
|
end
|
70
70
|
end
|
@@ -127,7 +127,7 @@ RSpec.describe Journaled::Delivery do
|
|
127
127
|
|
128
128
|
it 'catches the error and re-raises a subclass of NotTrulyExceptionalError and logs about the failure' do
|
129
129
|
expect(Rails.logger).to receive(:error).with(
|
130
|
-
"Kinesis Error - Networking Error occurred - Seahorse::Client::NetworkingError"
|
130
|
+
"Kinesis Error - Networking Error occurred - Seahorse::Client::NetworkingError",
|
131
131
|
).once
|
132
132
|
expect { subject.perform }.to raise_error described_class::KinesisTemporaryFailure
|
133
133
|
end
|
@@ -185,5 +185,38 @@ RSpec.describe Journaled::Delivery do
|
|
185
185
|
expect(subject.kinesis_client_config).to include(access_key_id: 'key_id', secret_access_key: 'secret')
|
186
186
|
end
|
187
187
|
end
|
188
|
+
|
189
|
+
it "will set http_idle_timeout by default" do
|
190
|
+
expect(subject.kinesis_client_config).to include(http_idle_timeout: 5)
|
191
|
+
end
|
192
|
+
|
193
|
+
it "will set http_open_timeout by default" do
|
194
|
+
expect(subject.kinesis_client_config).to include(http_open_timeout: 15)
|
195
|
+
end
|
196
|
+
|
197
|
+
it "will set http_read_timeout by default" do
|
198
|
+
expect(subject.kinesis_client_config).to include(http_read_timeout: 60)
|
199
|
+
end
|
200
|
+
|
201
|
+
context "when Journaled.http_idle_timeout is specified" do
|
202
|
+
it "will set http_idle_timeout by specified value" do
|
203
|
+
allow(Journaled).to receive(:http_idle_timeout).and_return(2)
|
204
|
+
expect(subject.kinesis_client_config).to include(http_idle_timeout: 2)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
context "when Journaled.http_open_timeout is specified" do
|
209
|
+
it "will set http_open_timeout by specified value" do
|
210
|
+
allow(Journaled).to receive(:http_open_timeout).and_return(2)
|
211
|
+
expect(subject.kinesis_client_config).to include(http_open_timeout: 2)
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
context "when Journaled.http_read_timeout is specified" do
|
216
|
+
it "will set http_read_timeout by specified value" do
|
217
|
+
allow(Journaled).to receive(:http_read_timeout).and_return(2)
|
218
|
+
expect(subject.kinesis_client_config).to include(http_read_timeout: 2)
|
219
|
+
end
|
220
|
+
end
|
188
221
|
end
|
189
222
|
end
|
@@ -25,22 +25,7 @@ RSpec.describe Journaled::Event do
|
|
25
25
|
it 'creates a Journaled::Writer with this event and journals it with the default priority' do
|
26
26
|
sample_journaled_event.journal!
|
27
27
|
expect(Journaled::Writer).to have_received(:new)
|
28
|
-
.with(journaled_event: sample_journaled_event
|
29
|
-
expect(mock_journaled_writer).to have_received(:journal!)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
context 'when there is an app job priority is set' do
|
34
|
-
around do |example|
|
35
|
-
orig_priority = Journaled.job_priority
|
36
|
-
Journaled.job_priority = 13
|
37
|
-
example.run
|
38
|
-
Journaled.job_priority = orig_priority
|
39
|
-
end
|
40
|
-
|
41
|
-
it 'creates a Journaled::Writer with this event and journals it with the given priority' do
|
42
|
-
sample_journaled_event.journal!
|
43
|
-
expect(Journaled::Writer).to have_received(:new).with(journaled_event: sample_journaled_event, priority: 13)
|
28
|
+
.with(journaled_event: sample_journaled_event)
|
44
29
|
expect(mock_journaled_writer).to have_received(:journal!)
|
45
30
|
end
|
46
31
|
end
|
@@ -145,9 +130,31 @@ RSpec.describe Journaled::Event do
|
|
145
130
|
created_at: frozen_time,
|
146
131
|
event_type: 'some_class_name',
|
147
132
|
foo: 'foo_return',
|
148
|
-
bar: 'bar_return'
|
133
|
+
bar: 'bar_return',
|
149
134
|
)
|
150
135
|
end
|
151
136
|
end
|
152
137
|
end
|
138
|
+
|
139
|
+
describe '#journaled_enqueue_opts, .journaled_enqueue_opts' do
|
140
|
+
it 'defaults to an empty hash' do
|
141
|
+
expect(sample_journaled_event.journaled_enqueue_opts).to eq({})
|
142
|
+
expect(sample_journaled_event_class.journaled_enqueue_opts).to eq({})
|
143
|
+
end
|
144
|
+
|
145
|
+
context 'when there are custom opts provided' do
|
146
|
+
let(:sample_journaled_event_class) do
|
147
|
+
Class.new do
|
148
|
+
include Journaled::Event
|
149
|
+
|
150
|
+
journal_attributes :foo, enqueue_with: { priority: 34, foo: 'bar' }
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
it 'merges in the custom opts' do
|
155
|
+
expect(sample_journaled_event.journaled_enqueue_opts).to eq(priority: 34, foo: 'bar')
|
156
|
+
expect(sample_journaled_event_class.journaled_enqueue_opts).to eq(priority: 34, foo: 'bar')
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
153
160
|
end
|
@@ -12,7 +12,7 @@ RSpec.describe Journaled::JsonSchemaModel::Validator do
|
|
12
12
|
some_time: Time.zone.parse('2017-01-20 15:16:17 -05:00'),
|
13
13
|
some_int: some_int_value,
|
14
14
|
some_optional_string: some_optional_string_value,
|
15
|
-
some_nullable_field: some_nullable_field
|
15
|
+
some_nullable_field: some_nullable_field,
|
16
16
|
}
|
17
17
|
end
|
18
18
|
let(:some_int_value) { 3 }
|
@@ -77,7 +77,7 @@ RSpec.describe Journaled::JsonSchemaModel::Validator do
|
|
77
77
|
some_decimal: 0.1.to_d,
|
78
78
|
some_time: Time.zone.parse('2017-01-20 15:16:17 -05:00'),
|
79
79
|
some_int: some_int_value,
|
80
|
-
some_nullable_field: some_nullable_field
|
80
|
+
some_nullable_field: some_nullable_field,
|
81
81
|
}
|
82
82
|
end
|
83
83
|
|
@@ -108,7 +108,7 @@ RSpec.describe Journaled::JsonSchemaModel::Validator do
|
|
108
108
|
{
|
109
109
|
some_string: some_string_value,
|
110
110
|
some_decimal: 0.1.to_d,
|
111
|
-
some_time: Time.zone.parse('2017-01-20 15:16:17 -05:00')
|
111
|
+
some_time: Time.zone.parse('2017-01-20 15:16:17 -05:00'),
|
112
112
|
}
|
113
113
|
end
|
114
114
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'rails_helper'
|
2
2
|
|
3
3
|
RSpec.describe Journaled::Writer do
|
4
|
-
subject { described_class.new journaled_event: journaled_event
|
4
|
+
subject { described_class.new journaled_event: journaled_event }
|
5
5
|
|
6
6
|
describe '#initialize' do
|
7
7
|
context 'when the Journaled Event does not implement all the necessary methods' do
|
@@ -18,7 +18,8 @@ RSpec.describe Journaled::Writer do
|
|
18
18
|
journaled_schema_name: nil,
|
19
19
|
journaled_attributes: {},
|
20
20
|
journaled_partition_key: '',
|
21
|
-
journaled_app_name: nil
|
21
|
+
journaled_app_name: nil,
|
22
|
+
journaled_enqueue_opts: {},
|
22
23
|
)
|
23
24
|
end
|
24
25
|
|
@@ -33,12 +34,13 @@ RSpec.describe Journaled::Writer do
|
|
33
34
|
journaled_schema_name: :fake_schema_name,
|
34
35
|
journaled_attributes: { foo: :bar },
|
35
36
|
journaled_partition_key: 'fake_partition_key',
|
36
|
-
journaled_app_name: nil
|
37
|
+
journaled_app_name: nil,
|
38
|
+
journaled_enqueue_opts: {},
|
37
39
|
)
|
38
40
|
end
|
39
41
|
|
40
42
|
it 'does not raise on initialization' do
|
41
|
-
expect { subject }.
|
43
|
+
expect { subject }.not_to raise_error
|
42
44
|
end
|
43
45
|
end
|
44
46
|
end
|
@@ -67,12 +69,14 @@ RSpec.describe Journaled::Writer do
|
|
67
69
|
allow(File).to receive(:read).with(schema_path).and_return(schema_file_contents)
|
68
70
|
end
|
69
71
|
|
72
|
+
let(:journaled_enqueue_opts) { {} }
|
70
73
|
let(:journaled_event) do
|
71
74
|
double(
|
72
75
|
journaled_schema_name: :fake_schema_name,
|
73
76
|
journaled_attributes: journaled_event_attributes,
|
74
77
|
journaled_partition_key: 'fake_partition_key',
|
75
|
-
journaled_app_name: 'my_app'
|
78
|
+
journaled_app_name: 'my_app',
|
79
|
+
journaled_enqueue_opts: journaled_enqueue_opts,
|
76
80
|
)
|
77
81
|
end
|
78
82
|
|
@@ -108,18 +112,27 @@ RSpec.describe Journaled::Writer do
|
|
108
112
|
expect(Journaled::Delivery).to have_received(:new).with(hash_including(app_name: 'my_app'))
|
109
113
|
end
|
110
114
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
+
context 'when there is no job priority specified in the enqueue opts' do
|
116
|
+
around do |example|
|
117
|
+
old_priority = Journaled.job_priority
|
118
|
+
Journaled.job_priority = 999
|
119
|
+
example.run
|
120
|
+
Journaled.job_priority = old_priority
|
121
|
+
end
|
122
|
+
|
123
|
+
it 'defaults to the global default' do
|
124
|
+
expect { subject.journal! }.to change {
|
125
|
+
Delayed::Job.where('handler like ?', '%Journaled::Delivery%').where(priority: 999).count
|
126
|
+
}.from(0).to(1)
|
127
|
+
end
|
115
128
|
end
|
116
129
|
|
117
|
-
context 'when
|
118
|
-
|
130
|
+
context 'when there is a job priority specified in the enqueue opts' do
|
131
|
+
let(:journaled_enqueue_opts) { { priority: 13 } }
|
119
132
|
|
120
|
-
it 'enqueues
|
133
|
+
it 'enqueues a Journaled::Delivery object with the given priority' do
|
121
134
|
expect { subject.journal! }.to change {
|
122
|
-
Delayed::Job.where('handler like ?', '%Journaled::Delivery%').where(priority:
|
135
|
+
Delayed::Job.where('handler like ?', '%Journaled::Delivery%').where(priority: 13).count
|
123
136
|
}.from(0).to(1)
|
124
137
|
end
|
125
138
|
end
|
metadata
CHANGED
@@ -1,32 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: journaled
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jake Lipson
|
8
8
|
- Corey Alexander
|
9
9
|
- Cyrus Eslami
|
10
10
|
- John Mileham
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2020-12-09 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
|
-
name: aws-sdk-
|
17
|
+
name: aws-sdk-kinesis
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|
19
19
|
requirements:
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '2'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - "<"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '2'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: delayed_job
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,16 +59,22 @@ dependencies:
|
|
59
59
|
name: rails
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
|
-
- - "
|
62
|
+
- - ">="
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: '5.1'
|
65
|
+
- - "<"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '7.0'
|
65
68
|
type: :runtime
|
66
69
|
prerelease: false
|
67
70
|
version_requirements: !ruby/object:Gem::Requirement
|
68
71
|
requirements:
|
69
|
-
- - "
|
72
|
+
- - ">="
|
70
73
|
- !ruby/object:Gem::Version
|
71
74
|
version: '5.1'
|
75
|
+
- - "<"
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '7.0'
|
72
78
|
- !ruby/object:Gem::Dependency
|
73
79
|
name: request_store
|
74
80
|
requirement: !ruby/object:Gem::Requirement
|
@@ -83,6 +89,20 @@ dependencies:
|
|
83
89
|
- - ">="
|
84
90
|
- !ruby/object:Gem::Version
|
85
91
|
version: '0'
|
92
|
+
- !ruby/object:Gem::Dependency
|
93
|
+
name: appraisal
|
94
|
+
requirement: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - "~>"
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 2.2.0
|
99
|
+
type: :development
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - "~>"
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: 2.2.0
|
86
106
|
- !ruby/object:Gem::Dependency
|
87
107
|
name: delayed_job_active_record
|
88
108
|
requirement: !ruby/object:Gem::Requirement
|
@@ -157,16 +177,16 @@ dependencies:
|
|
157
177
|
name: rubocop-betterment
|
158
178
|
requirement: !ruby/object:Gem::Requirement
|
159
179
|
requirements:
|
160
|
-
- -
|
180
|
+
- - "~>"
|
161
181
|
- !ruby/object:Gem::Version
|
162
|
-
version: 1.3
|
182
|
+
version: '1.3'
|
163
183
|
type: :development
|
164
184
|
prerelease: false
|
165
185
|
version_requirements: !ruby/object:Gem::Requirement
|
166
186
|
requirements:
|
167
|
-
- -
|
187
|
+
- - "~>"
|
168
188
|
- !ruby/object:Gem::Version
|
169
|
-
version: 1.3
|
189
|
+
version: '1.3'
|
170
190
|
- !ruby/object:Gem::Dependency
|
171
191
|
name: spring
|
172
192
|
requirement: !ruby/object:Gem::Requirement
|
@@ -195,6 +215,20 @@ dependencies:
|
|
195
215
|
- - ">="
|
196
216
|
- !ruby/object:Gem::Version
|
197
217
|
version: '0'
|
218
|
+
- !ruby/object:Gem::Dependency
|
219
|
+
name: sprockets
|
220
|
+
requirement: !ruby/object:Gem::Requirement
|
221
|
+
requirements:
|
222
|
+
- - "<"
|
223
|
+
- !ruby/object:Gem::Version
|
224
|
+
version: '4.0'
|
225
|
+
type: :development
|
226
|
+
prerelease: false
|
227
|
+
version_requirements: !ruby/object:Gem::Requirement
|
228
|
+
requirements:
|
229
|
+
- - "<"
|
230
|
+
- !ruby/object:Gem::Version
|
231
|
+
version: '4.0'
|
198
232
|
- !ruby/object:Gem::Dependency
|
199
233
|
name: timecop
|
200
234
|
requirement: !ruby/object:Gem::Requirement
|
@@ -255,7 +289,7 @@ files:
|
|
255
289
|
- journaled_schemas/journaled/change.json
|
256
290
|
- lib/journaled.rb
|
257
291
|
- lib/journaled/engine.rb
|
258
|
-
- lib/journaled/
|
292
|
+
- lib/journaled/enqueue.rb
|
259
293
|
- lib/journaled/relation_change_protection.rb
|
260
294
|
- lib/journaled/rspec.rb
|
261
295
|
- lib/journaled/version.rb
|
@@ -285,8 +319,6 @@ files:
|
|
285
319
|
- spec/dummy/config/secrets.yml
|
286
320
|
- spec/dummy/db/migrate/20180606205114_create_delayed_jobs.rb
|
287
321
|
- spec/dummy/db/schema.rb
|
288
|
-
- spec/dummy/log/development.log
|
289
|
-
- spec/dummy/log/test.log
|
290
322
|
- spec/dummy/public/404.html
|
291
323
|
- spec/dummy/public/422.html
|
292
324
|
- spec/dummy/public/500.html
|
@@ -309,7 +341,7 @@ homepage: http://github.com/Betterment/journaled
|
|
309
341
|
licenses:
|
310
342
|
- MIT
|
311
343
|
metadata: {}
|
312
|
-
post_install_message:
|
344
|
+
post_install_message:
|
313
345
|
rdoc_options: []
|
314
346
|
require_paths:
|
315
347
|
- lib
|
@@ -324,9 +356,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
324
356
|
- !ruby/object:Gem::Version
|
325
357
|
version: '0'
|
326
358
|
requirements: []
|
327
|
-
|
328
|
-
|
329
|
-
signing_key:
|
359
|
+
rubygems_version: 3.0.1
|
360
|
+
signing_key:
|
330
361
|
specification_version: 4
|
331
362
|
summary: Journaling for Betterment apps.
|
332
363
|
test_files:
|
@@ -360,8 +391,6 @@ test_files:
|
|
360
391
|
- spec/dummy/public/404.html
|
361
392
|
- spec/dummy/db/schema.rb
|
362
393
|
- spec/dummy/db/migrate/20180606205114_create_delayed_jobs.rb
|
363
|
-
- spec/dummy/log/test.log
|
364
|
-
- spec/dummy/log/development.log
|
365
394
|
- spec/dummy/README.rdoc
|
366
395
|
- spec/models/journaled/json_schema_model/validator_spec.rb
|
367
396
|
- spec/models/journaled/actor_uri_provider_spec.rb
|
@@ -1,5 +0,0 @@
|
|
1
|
-
module Journaled::JobPriority
|
2
|
-
INTERACTIVE = 0 # These jobs will actively hinder end-user interactions until complete, e.g. assembling a report a user is polling for.
|
3
|
-
USER_VISIBLE = 10 # These jobs have end-user-visible side effects that will not obviously impact customers, e.g. welcome emails
|
4
|
-
EVENTUAL = 20 # These jobs affect business process that are tolerant to some degree of queue backlog, e.g. desk record synchronization
|
5
|
-
end
|
@@ -1,120 +0,0 @@
|
|
1
|
-
[1m[35m (456.1ms)[0m [1m[35mCREATE DATABASE "journaled_development" ENCODING = 'unicode'[0m
|
2
|
-
[1m[35m (423.4ms)[0m [1m[35mCREATE DATABASE "journaled_test" ENCODING = 'unicode'[0m
|
3
|
-
[1m[35mSQL (0.5ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
4
|
-
[1m[35m (0.2ms)[0m [1m[35mDROP TABLE IF EXISTS "delayed_jobs" CASCADE[0m
|
5
|
-
[1m[35m (21.3ms)[0m [1m[35mCREATE TABLE "delayed_jobs" ("id" bigserial primary key, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" timestamp, "locked_at" timestamp, "failed_at" timestamp, "locked_by" character varying, "queue" character varying, "created_at" timestamp, "updated_at" timestamp)[0m
|
6
|
-
[1m[35m (1.1ms)[0m [1m[35mCREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")[0m
|
7
|
-
[1m[35m (2.7ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
8
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
9
|
-
[1m[35m (6.2ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20180606205114)[0m
|
10
|
-
[1m[35m (19.6ms)[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
|
11
|
-
[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]]
|
12
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
13
|
-
[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", "2018-06-26 19:19:25.082089"], ["updated_at", "2018-06-26 19:19:25.082089"]]
|
14
|
-
[1m[35m (5.8ms)[0m [1m[35mCOMMIT[0m
|
15
|
-
[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]]
|
16
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
17
|
-
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
18
|
-
[1m[35mSQL (0.5ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
19
|
-
[1m[35m (0.2ms)[0m [1m[35mDROP TABLE IF EXISTS "delayed_jobs" CASCADE[0m
|
20
|
-
[1m[35m (11.0ms)[0m [1m[35mCREATE TABLE "delayed_jobs" ("id" bigserial primary key, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" timestamp, "locked_at" timestamp, "failed_at" timestamp, "locked_by" character varying, "queue" character varying, "created_at" timestamp, "updated_at" timestamp)[0m
|
21
|
-
[1m[35m (1.5ms)[0m [1m[35mCREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")[0m
|
22
|
-
[1m[35m (3.0ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
23
|
-
[1m[35m (0.8ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
24
|
-
[1m[35m (0.8ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20180606205114)[0m
|
25
|
-
[1m[35m (3.3ms)[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
|
26
|
-
[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]]
|
27
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
28
|
-
[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", "2018-06-26 19:19:25.142470"], ["updated_at", "2018-06-26 19:19:25.142470"]]
|
29
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
30
|
-
[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]]
|
31
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
32
|
-
[1m[36mActiveRecord::InternalMetadata Update (0.3ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3[0m [["value", "test"], ["updated_at", "2018-06-26 19:19:25.145681"], ["key", "environment"]]
|
33
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
34
|
-
[1m[35m (0.7ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
35
|
-
[1m[35m (2.6ms)[0m [1m[35mCREATE DATABASE "journaled_development" ENCODING = 'utf8'[0m
|
36
|
-
[1m[35m (0.5ms)[0m [1m[35mCREATE DATABASE "journaled_test" ENCODING = 'utf8'[0m
|
37
|
-
[1m[35m (0.7ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
38
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
39
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
40
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
41
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
42
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
43
|
-
[1m[35mSQL (0.4ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
44
|
-
[1m[35m (5.0ms)[0m [1m[35mDROP TABLE IF EXISTS "delayed_jobs" CASCADE[0m
|
45
|
-
[1m[35m (5.1ms)[0m [1m[35mCREATE TABLE "delayed_jobs" ("id" bigserial primary key, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" timestamp, "locked_at" timestamp, "failed_at" timestamp, "locked_by" character varying, "queue" character varying, "created_at" timestamp, "updated_at" timestamp)[0m
|
46
|
-
[1m[35m (1.2ms)[0m [1m[35mCREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")[0m
|
47
|
-
[1m[35m (0.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
48
|
-
[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]]
|
49
|
-
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
50
|
-
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
51
|
-
[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]]
|
52
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
53
|
-
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
54
|
-
[1m[35mSQL (0.3ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
55
|
-
[1m[35m (10.8ms)[0m [1m[35mDROP TABLE IF EXISTS "delayed_jobs" CASCADE[0m
|
56
|
-
[1m[35m (6.6ms)[0m [1m[35mCREATE TABLE "delayed_jobs" ("id" bigserial primary key, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" timestamp, "locked_at" timestamp, "failed_at" timestamp, "locked_by" character varying, "queue" character varying, "created_at" timestamp, "updated_at" timestamp)[0m
|
57
|
-
[1m[35m (1.5ms)[0m [1m[35mCREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")[0m
|
58
|
-
[1m[35m (0.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
59
|
-
[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]]
|
60
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
61
|
-
[1m[36mActiveRecord::InternalMetadata Update (0.3ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3[0m [["value", "development"], ["updated_at", "2018-06-26 19:24:49.383169"], ["key", "environment"]]
|
62
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
63
|
-
[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]]
|
64
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
65
|
-
[1m[36mActiveRecord::InternalMetadata Update (0.3ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3[0m [["value", "test"], ["updated_at", "2018-06-26 19:24:49.386424"], ["key", "environment"]]
|
66
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
67
|
-
[1m[35m (0.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
68
|
-
[1m[35m (563.5ms)[0m [1m[35mCREATE DATABASE "journaled_development" ENCODING = 'utf8'[0m
|
69
|
-
[1m[35m (439.5ms)[0m [1m[35mCREATE DATABASE "journaled_test" ENCODING = 'utf8'[0m
|
70
|
-
[1m[35mSQL (0.7ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
71
|
-
[1m[35m (0.2ms)[0m [1m[35mDROP TABLE IF EXISTS "delayed_jobs" CASCADE[0m
|
72
|
-
[1m[35m (6.4ms)[0m [1m[35mCREATE TABLE "delayed_jobs" ("id" bigserial primary key, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" timestamp, "locked_at" timestamp, "failed_at" timestamp, "locked_by" character varying, "queue" character varying, "created_at" timestamp, "updated_at" timestamp)[0m
|
73
|
-
[1m[35m (1.1ms)[0m [1m[35mCREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")[0m
|
74
|
-
[1m[35m (2.3ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
75
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
76
|
-
[1m[35m (0.5ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20180606205114)[0m
|
77
|
-
[1m[35m (2.0ms)[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
|
78
|
-
[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]]
|
79
|
-
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
80
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.7ms)[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-05-28 16:43:50.056665"], ["updated_at", "2019-05-28 16:43:50.056665"]]
|
81
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
82
|
-
[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]]
|
83
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
84
|
-
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
85
|
-
[1m[35mSQL (0.4ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
86
|
-
[1m[35m (0.2ms)[0m [1m[35mDROP TABLE IF EXISTS "delayed_jobs" CASCADE[0m
|
87
|
-
[1m[35m (5.3ms)[0m [1m[35mCREATE TABLE "delayed_jobs" ("id" bigserial primary key, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" timestamp, "locked_at" timestamp, "failed_at" timestamp, "locked_by" character varying, "queue" character varying, "created_at" timestamp, "updated_at" timestamp)[0m
|
88
|
-
[1m[35m (1.0ms)[0m [1m[35mCREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")[0m
|
89
|
-
[1m[35m (2.2ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
90
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
91
|
-
[1m[35m (0.5ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20180606205114)[0m
|
92
|
-
[1m[35m (2.4ms)[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
|
93
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.5ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
94
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
95
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.4ms)[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-05-28 16:43:50.127229"], ["updated_at", "2019-05-28 16:43:50.127229"]]
|
96
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
97
|
-
[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]]
|
98
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
99
|
-
[1m[36mActiveRecord::InternalMetadata Update (0.4ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3[0m [["value", "test"], ["updated_at", "2019-05-28 16:43:50.131572"], ["key", "environment"]]
|
100
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
101
|
-
[1m[35m (0.8ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
102
|
-
[1m[35m (34.8ms)[0m [1m[34mSELECT pg_try_advisory_lock(6470627369034430140)[0m
|
103
|
-
[1m[35m (1.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
104
|
-
Migrating to AddSoldierTable (20190529213045)
|
105
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
106
|
-
[1m[35m (45.1ms)[0m [1m[35mCREATE TABLE "soldiers" ("id" uuid DEFAULT gen_random_uuid() NOT NULL PRIMARY KEY, "name" character varying, "rank" character varying, "serial_number" character varying, "last_sign_in_at" timestamp)[0m
|
107
|
-
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
108
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(6470627369034430140)[0m
|
109
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(6470627369034430140)[0m
|
110
|
-
[1m[35m (0.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
111
|
-
Migrating to AddSoldierTable (20190529213045)
|
112
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
113
|
-
[1m[35m (54.2ms)[0m [1m[35mCREATE TABLE "soldiers" ("id" bigserial primary key, "name" character varying, "rank" character varying, "serial_number" character varying, "last_sign_in_at" timestamp)[0m
|
114
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.4ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20190529213045"]]
|
115
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
116
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.5ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
117
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
118
|
-
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
119
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(6470627369034430140)[0m
|
120
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|