postgres_utility 1.0.1 → 1.0.2

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
  SHA256:
3
- metadata.gz: c2c57bdf515f8eec9ae85b15df2b68fc2a3d33465aa5156898c9b7aec38851c3
4
- data.tar.gz: 782f4a252779a4f83a61281456a12417780841753cae06fe7aa8b68db829f382
3
+ metadata.gz: 7ed67095a5644c9a35c4318e8204838b3cf69cccc6912c6f133fb5638daf049e
4
+ data.tar.gz: d340d2ab167c6ef9a0bef754f5769aab914114043f577f5ee416040272b52325
5
5
  SHA512:
6
- metadata.gz: 453344285b50abf4a4cd2443f20d936442dd3f5965e4876fe380abc59b7c9db48d9fa8e52d46ac8e597d7ff20a87c130f2fe6c9bf33879ae2f57f7fc936d00c8
7
- data.tar.gz: b211197198cb3057555e73536be19791ca8bdc70176b6c5f6f498814df8f2cb89d47bfb8ebc9f652daca6d4c1ee0b1606921780904c61e0671ee79d19412ef0a
6
+ metadata.gz: 0052ed4b3fdcef0f06ff62ef54b1cef2f5998c215903bd2d3cee73377c81f332531c3db2e66b85de986bae5138118f880abfe91841b84ebb15b43b62d4e23ef6
7
+ data.tar.gz: e54235fd982ef0cda47b05636cf0d1d204586bc51f26b272d4c0571315d6c5ee23aab7dd3cd9b88e0fc3b3e61c3e47d71c450f79eb167685c7c0e2ac556763ff
data/CHANGELOG.md CHANGED
@@ -6,4 +6,8 @@
6
6
 
7
7
  ## [1.0.1] - 2021-10-08
8
8
 
9
- - use sanitize method instead of sanitize_sql if sanitize_sql is not supported by activerecord
9
+ - use sanitize method instead of sanitize_sql if sanitize_sql is not supported by activerecord
10
+
11
+ ## [1.0.1] - 2021-10-27
12
+
13
+ - update multi_truncate_reset_populate_from_csv to use column_names from first argument tables
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- postgres_utility (1.0.0)
4
+ postgres_utility (1.0.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PostgresUtility
4
- VERSION = '1.0.1'
4
+ VERSION = '1.0.2'
5
5
  end
@@ -246,8 +246,8 @@ module PostgresUtility
246
246
  # transaction, we will manually need to drop this table
247
247
  pg_conn.exec("CREATE TABLE #{tbl_copy} (LIKE #{tbl} INCLUDING DEFAULTS)")
248
248
  # pg_conn.exec("DROP TABLE IF EXISTS #{tbl_copy}")
249
- if opts[:column_names].present? && opts[:column_names].is_a?(Array)
250
- cols = opts[:column_names].join(',')
249
+ if table[:column_names].present? && table[:column_names].is_a?(Array)
250
+ cols = table[:column_names].join(',')
251
251
  qcopy = "COPY #{tbl_copy}(#{cols}) FROM STDIN WITH DELIMITER ',' CSV HEADER"
252
252
  else
253
253
  qcopy = "COPY #{tbl_copy} FROM STDIN WITH DELIMITER ',' CSV HEADER"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postgres_utility
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - sachinsaxena1996
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-11 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord