phobos_db_checkpoint 1.1.0 → 2.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2b492fa71a95e8304f837094421494f8a441a1a
4
- data.tar.gz: 6470c1c13a9ab979cac8f228a725d5782e50f027
3
+ metadata.gz: 8926e279eed934a82a9fd0b397186d725897f71e
4
+ data.tar.gz: f280f58a398f03e792e4dd9a3a87772a054414f2
5
5
  SHA512:
6
- metadata.gz: f2327f3693b35fb330f9af48a878dd7e825e24eadb7f43627ad348c0c48f0f9df2c72c10933bf95298faf99e02a18220348647126073db1add6e3f8705b0b1cb
7
- data.tar.gz: 5cf8e5153d09340f01aab345b55ad07891ea055a8946648f503b382dd8b67adaed0ad8ff6a626ee32d8056ab5047bf55909fbcb154a4982702741bcf20924651
6
+ metadata.gz: 904386e41f5ae1c9273e027748b12cd56712c63dfbcfaa349b827f4101b1cff19931d73b0787665ba97158c9aebaa808b83c49e14cc1782a924d1e26b03a7781
7
+ data.tar.gz: 8d414cd8c50562519b2419878e880de52e1a3c2590adceced3e9a62fdc993ac126eb64d0cae5e95e891006660feb9c0b1963e6c49e8edd1770b428d952ee9bfe
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.0.0.rc1 (2017-02-28)
8
+
9
+ - [enhancement] Rename tables
10
+
7
11
  ## 1.1.0 (2017-02-28)
8
12
 
9
13
  - [feature] Add end point for fetching individual failures
data/README.md CHANGED
@@ -18,6 +18,7 @@ Phobos DB Checkpoint is a plugin to [Phobos](https://github.com/klarna/phobos) a
18
18
  1. [Accessing the events](#accessing-the-events)
19
19
  1. [Events API](#events-api)
20
20
  1. [Instrumentation](#instrumentation)
21
+ 1. [Upgrading](#upgrading)
21
22
  1. [Development](#development)
22
23
 
23
24
  ## <a name="installation"></a> Installation
@@ -295,6 +296,30 @@ The following payload is included for all notifications:
295
296
  * retry_count
296
297
  * checksum
297
298
 
299
+ ## <a name="upgrading"></a> Upgrading
300
+
301
+ #### From <2.0 to 2.x
302
+
303
+ ##### Rename database tables
304
+
305
+ The database table names for Event and Failure has been changed to be namespaced under `phobos_db_checkpoint_` to avoid potential collisions with projects that already have these names.
306
+
307
+ This means that when upgrading one would have to add a new migration to rename from old name to new:
308
+
309
+ ```ruby
310
+ def up
311
+ rename_table :events, :phobos_db_checkpoint_events
312
+ rename_table :failures, :phobos_db_checkpoint_failures
313
+ end
314
+ ```
315
+
316
+ Alternatively, one could potentially configure the tables to use the old names, as such:
317
+
318
+ ```ruby
319
+ PhobosDBCheckpoint::Event.table_name = :events
320
+ PhobosDBCheckpoint::Failure.table_name = :failures
321
+ ```
322
+
298
323
  ## <a name="development"></a> Development
299
324
 
300
325
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rspec spec` to run the tests.
@@ -22,6 +22,10 @@ module PhobosDBCheckpoint
22
22
  attr_reader :db_config
23
23
  attr_accessor :db_config_path, :db_dir, :migration_path
24
24
 
25
+ def table_name_prefix
26
+ :phobos_db_checkpoint_
27
+ end
28
+
25
29
  def configure(pool_size: nil)
26
30
  load_db_config(pool_size: pool_size)
27
31
  at_exit { PhobosDBCheckpoint.close_db_connection }
@@ -1,3 +1,3 @@
1
1
  module PhobosDBCheckpoint
2
- VERSION = '1.1.0'
2
+ VERSION = '2.0.0.rc1'
3
3
  end
@@ -1,6 +1,6 @@
1
1
  class Phobos01CreateEvents < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
2
2
  def up
3
- create_table :events do |t|
3
+ create_table :phobos_db_checkpoint_events do |t|
4
4
  t.string :topic, index: true
5
5
  t.string :group_id, index: true
6
6
  t.string :entity_id, index: true
@@ -11,10 +11,10 @@ class Phobos01CreateEvents < ActiveRecord::Migration[<%= ActiveRecord::Migration
11
11
  t.json :payload
12
12
  end
13
13
 
14
- add_index :events, [:topic, :group_id, :checksum]
14
+ add_index :phobos_db_checkpoint_events, [:topic, :group_id, :checksum], name: :index_phobos_db_checkpoint_events_on_topic_group_id_checksum
15
15
  end
16
16
 
17
17
  def down
18
- drop_table :events
18
+ drop_table :phobos_db_checkpoint_events
19
19
  end
20
20
  end
@@ -1,6 +1,6 @@
1
1
  class Phobos02CreateFailures < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
2
2
  def up
3
- create_table :failures do |t|
3
+ create_table :phobos_db_checkpoint_failures do |t|
4
4
  t.timestamp :created_at, index: false
5
5
  t.string :topic, index: true
6
6
  t.string :group_id, index: true
@@ -18,6 +18,6 @@ class Phobos02CreateFailures < ActiveRecord::Migration[<%= ActiveRecord::Migrati
18
18
  end
19
19
 
20
20
  def down
21
- drop_table :failures
21
+ drop_table :phobos_db_checkpoint_failures
22
22
  end
23
23
  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: 1.1.0
4
+ version: 2.0.0.rc1
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-02-28 00:00:00.000000000 Z
16
+ date: 2017-03-01 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: bundler
@@ -287,9 +287,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
287
287
  version: '2.3'
288
288
  required_rubygems_version: !ruby/object:Gem::Requirement
289
289
  requirements:
290
- - - ">="
290
+ - - ">"
291
291
  - !ruby/object:Gem::Version
292
- version: '0'
292
+ version: 1.3.1
293
293
  requirements: []
294
294
  rubyforge_project:
295
295
  rubygems_version: 2.6.8