pgmove 0.1.2 → 0.1.3

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: 0058ca9cae26f102cb737c5bbddfa5fc1cd2303e
4
- data.tar.gz: 4ee6d28a48f312ec2e8fb08b2361c274c79bbb8d
3
+ metadata.gz: 00b005d8b2d38bd0eb5b5480326f534076e494ab
4
+ data.tar.gz: 1056b670b437a30e687eeeecc4549c02393fa83d
5
5
  SHA512:
6
- metadata.gz: 6cab6cabfc2672a336aa23589a6b472b6db9373d8024bdad62ab9f951266cda728c459a4f85106a464cc7c7e8f7470b645bff170c0750232165aaaa45bc41115
7
- data.tar.gz: eab66862325c672359c553fb3b28de88f98c6c8bad49c7d3a376b84ee3a895aa62e3cf80d17d16615fd6f1acc155f03c7051bef99dc884fac9640fbaccd31caf
6
+ metadata.gz: d945e20d99cdcd74d23c2556f8ebc481011754c1ad3fd5484436253c44d650a9aff512925ed105e3a004a8f2cb68646701e9ae909c76ab87440efe791eb167c6
7
+ data.tar.gz: f4bbb8fabccf30308e1d69bf715322d84dcb443c9dbab0ce7b031785a4c247a020d1576559cce6920f7b7a7a2d7477eabace8999506e83fe835c75791755ef14
@@ -129,7 +129,7 @@ module Pgmove
129
129
  end
130
130
 
131
131
  def add_tables
132
- bucardo "add all tables db=source_db relgroup=#{RELGROUP} -T public.spatial_ref_sys -N postgis"
132
+ bucardo "add all tables db=source_db relgroup=#{RELGROUP} -T public.spatial_ref_sys -N postgis -T spatial_ref_sys"
133
133
  bucardo "add all sequences db=source_db relgroup=#{RELGROUP}"
134
134
  end
135
135
 
data/lib/pgmove/db.rb CHANGED
@@ -89,20 +89,15 @@ module Pgmove
89
89
  end
90
90
 
91
91
  def row_count(table, conn:)
92
- sql = "select count(*) from #{table}"
92
+ split = table.split(".")
93
+ schema = split[0]
94
+ name = split[1]
95
+ sql = %(select count(*) from #{schema}."#{name}")
93
96
  conn.exec(sql)[0]["count"].to_i
94
97
  rescue
95
98
  -1
96
99
  end
97
100
 
98
- def compare(other_db)
99
- row_counts = row_counts()
100
- other_row_counts = other_db.row_counts
101
- row_counts.each do |k, v|
102
- printf "%-60s %15d %15d\n", k, row_counts[k], other_row_counts[k]
103
- end
104
- end
105
-
106
101
  def pg_conn(db = nil)
107
102
  db ||= @name
108
103
  conn = PG::Connection.open(
@@ -1,3 +1,3 @@
1
1
  module Pgmove
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pgmove
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neeraj
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-30 00:00:00.000000000 Z
11
+ date: 2016-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg