phobos_db_checkpoint 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bded9e44c71ab913e667bd410909c32349a80d95
4
- data.tar.gz: bbe38ca65038fd8fe9c768d6b5a2342b6498cf8d
3
+ metadata.gz: 2d2b59444155c65c496cc82cdfd0d207d559864e
4
+ data.tar.gz: e773605edaed41e4488d17eed9432acdd6c4fdda
5
5
  SHA512:
6
- metadata.gz: dc3d96c808dfaabd944eeb5851dd57b5e62bf386f78897d885df524d908e3d94cf9bb72999e93899571043d804338737b95d5acbb9503d3e318c438c1f441e2d
7
- data.tar.gz: 5a2d60b0c1e9ef12eb57072f0013b0af5e74eac4a32a64fb75018abd302ecfda0b62a95d56b1dded8456f7263694186e72d38de66316b37a900141af0d986028
6
+ metadata.gz: fa9c6907b296e0e7e9dbc56652113b1ed516247ea8f2929fac21e21e5e9d0b714954d9fccf6c2436aaa42dd68cf0a3238832853b6ca8d504f9fc836f4d2e58d5
7
+ data.tar.gz: e980acdff99268c48fe2b4c51281b9ada6b3d4847add1131645a5966571bcfe4134eb1b8b9c5c16d2908462699a30ebc7867d7a9affe26700fec94b117abb7e6
data/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## 2.3.1 (2017-03-11)
8
+
9
+ - [bugfix] Add index required for current implementation of Phobos Checkpoint UI
10
+
7
11
  ## 2.3.0 (2017-03-08)
8
12
 
9
13
  - [enhancement] Add created_at to events table
@@ -1,3 +1,3 @@
1
1
  module PhobosDBCheckpoint
2
- VERSION = '2.3.0'
2
+ VERSION = '2.3.1'
3
3
  end
@@ -0,0 +1,53 @@
1
+ class Phobos04CreateEventsApiIndex < ActiveRecord::Migration[<%= ActiveRecord::VERSION::STRING.to_f %>]
2
+ def up
3
+ say 'Adding events api indices'
4
+ add_index :phobos_db_checkpoint_events,
5
+ [:event_time, :created_at],
6
+ name: :phobos_events_event_time_created_at_desc_nulls_last_idx,
7
+ order: {event_time: 'desc nulls last', created_at: 'desc nulls last'},
8
+ using: :btree
9
+
10
+ add_index :phobos_db_checkpoint_failures,
11
+ [:event_time, :created_at],
12
+ name: :phobos_failures_event_time_created_at_desc_nulls_last_idx,
13
+ order: {event_time: 'desc nulls last', created_at: 'desc nulls last'},
14
+ using: :btree
15
+
16
+ say 'Removing unused indices'
17
+ remove_index :phobos_db_checkpoint_events, name: :phobos_events_event_time_desc_nulls_last_idx
18
+ remove_index :phobos_db_checkpoint_events, name: :phobos_events_created_at_desc_nulls_last_idx
19
+ remove_index :phobos_db_checkpoint_failures, name: :phobos_failures_event_time_desc_nulls_last_idx
20
+ remove_index :phobos_db_checkpoint_failures, name: :phobos_failures_created_at_desc_nulls_last_idx
21
+ end
22
+
23
+ def down
24
+ say 'Removing new events api indices'
25
+ remove_index :phobos_db_checkpoint_events, name: :phobos_events_event_time_created_at_desc_nulls_last_idx
26
+ remove_index :phobos_db_checkpoint_failures, name: :phobos_failures_event_time_created_at_desc_nulls_last_idx
27
+
28
+ say 'Adding old indices back'
29
+ add_index :phobos_db_checkpoint_events,
30
+ [:event_time],
31
+ name: :phobos_events_event_time_desc_nulls_last_idx,
32
+ order: {event_time: 'desc nulls last'},
33
+ using: :btree
34
+
35
+ add_index :phobos_db_checkpoint_events,
36
+ [:created_at],
37
+ name: :phobos_events_created_at_desc_nulls_last_idx,
38
+ order: {created_at: 'desc nulls last'},
39
+ using: :btree
40
+
41
+ add_index :phobos_db_checkpoint_failures,
42
+ [:event_time],
43
+ name: :phobos_failures_event_time_desc_nulls_last_idx,
44
+ order: {event_time: 'desc nulls last'},
45
+ using: :btree
46
+
47
+ add_index :phobos_db_checkpoint_failures,
48
+ [:created_at],
49
+ name: :phobos_failures_created_at_desc_nulls_last_idx,
50
+ order: {created_at: 'desc nulls last'},
51
+ using: :btree
52
+ end
53
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phobos_db_checkpoint
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Túlio Ornelas
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2017-03-09 00:00:00.000000000 Z
16
+ date: 2017-03-13 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: bundler
@@ -270,6 +270,7 @@ files:
270
270
  - templates/migrate/phobos_01_create_events.rb.erb
271
271
  - templates/migrate/phobos_02_create_failures.rb.erb
272
272
  - templates/migrate/phobos_03_add_created_at_to_events.rb.erb
273
+ - templates/migrate/phobos_04_create_events_api_index.rb.erb
273
274
  - templates/new_migration.rb.erb
274
275
  - templates/phobos_boot.rb
275
276
  homepage: https://github.com/klarna/phobos_db_checkpoint
@@ -293,7 +294,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
293
294
  version: '0'
294
295
  requirements: []
295
296
  rubyforge_project:
296
- rubygems_version: 2.5.1
297
+ rubygems_version: 2.6.8
297
298
  signing_key:
298
299
  specification_version: 4
299
300
  summary: Phobos DB Checkpoint is a plugin to Phobos and is meant as a drop in replacement