pg-pglogical 2.0.0 → 2.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74c18de23fcc3890e16879a1ddbb8224c5470a66
4
- data.tar.gz: b53e0a41455b66ce23a75f1952323140191ffd33
3
+ metadata.gz: '04681bd0e6800c3dbe83a829326246c4410a93e6'
4
+ data.tar.gz: cfdb595292dd9ffef00a4f9ed3b29a12bb595d0a
5
5
  SHA512:
6
- metadata.gz: d7ec9d921bedae51ef15f2da54ed01ddb173b29fa68d0527f4862083f84dfce82d53b798b276d986db7f91d04e2c67c5f64b706193c24f2979d5973453382b99
7
- data.tar.gz: 1eca65e48fd922df09d491dd5fc2667768cec08c66cf56e01fbe8b2850e54853a35ca3d1dae5557f9769c9c282177c3eef58762b435831fc9781fd87a0b0908a
6
+ metadata.gz: ee49368784dd65348e8e462914a347a8118d85a7450359f5a669871662d3a63c2714549e3815205812c95d307868a54d7b93e0cecd395e4461b0f7d6c1eaf45e
7
+ data.tar.gz: 0e58cbd7a6d61e9d3a0a63ce4667cabba32592477f01efc600985af0a6b9f7bbdcf0a9fb1a4654caff5fa0acac96083698abc018b10100f4eb0e202caf06da14
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [2.1.0] - 2017-11-13
10
+ ### Added
11
+ - Prepend to activerecord's drop table method for removing the table from replication sets [[#14](https://github.com/ManageIQ/pg-pglogical/pull/14)]
12
+
9
13
  ## [2.0.0] - 2017-10-11
10
14
  ### Changed
11
15
  - Alter definitions for pglogical 2.0+ compatibility [[#12](https://github.com/ManageIQ/pg-pglogical/pull/12)]
@@ -9,7 +9,20 @@ module PG
9
9
  PG::Pglogical::Client.new(self)
10
10
  end
11
11
  end
12
+
13
+ module MigrationExtension
14
+ def drop_table(table)
15
+ pgl = PG::Pglogical::Client.new(ApplicationRecord.connection)
16
+ if pgl.enabled?
17
+ pgl.replication_sets.each do |set|
18
+ pgl.replication_set_remove_table(set, table) if pgl.tables_in_replication_set(set).include?(table)
19
+ end
20
+ end
21
+ super
22
+ end
23
+ end
12
24
  end
13
25
  end
14
26
 
15
27
  ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.include PG::Pglogical::ActiveRecordExtension
28
+ ActiveRecord::Migration.prepend PG::Pglogical::MigrationExtension
@@ -1,5 +1,5 @@
1
1
  module PG
2
2
  module Pglogical
3
- VERSION = "2.0.0".freeze
3
+ VERSION = "2.1.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg-pglogical
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Carboni
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-11 00:00:00.000000000 Z
11
+ date: 2017-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord