postgresql-check 0.1.2 → 0.1.3

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: c08745ac927cd044ce700402e6d60792bb826225
4
- data.tar.gz: 98b1de633ab7187f667497ccbc40e310df26570e
3
+ metadata.gz: 4be93ea593cfc45bd697bfc9a80ad8d59aa3c5a0
4
+ data.tar.gz: c197ae4bcffd2e2752a80e6a10681ccee9f1f0df
5
5
  SHA512:
6
- metadata.gz: 7f949a7d61e580412fd924b45de7c314a57547ab7e8b4a9d07c525e5f09f4230e20741e1f4cfeeaeb3c5bc2a98a72d5e4a90df61239bb714af24a078f55da55e
7
- data.tar.gz: 3ad44ef6fc826b2cdf6ff3a92fb4804a2361f7778ec396ee6a7a45edca0c357cb2b30be9234e08315141d4778d620a8b58490b07ea9f491d9e8a5608e48e9194
6
+ metadata.gz: f208e43095c3d6daa23035df70283f439503ca4a0e2c2c7abb759944d2229c028957a960eb514c9fe86df56c4e5600f3edd53fe982a946528fd2e793192a29c5
7
+ data.tar.gz: 89929415522dc9c82c3be7cd0c07a3418e77b5bcaa0a3c7e2e18d4774ffb86c730e96dbbb1108ddbd15377cb91fde9ccfe5fe774aa9156d27440dcdc14c3d4ba
@@ -27,7 +27,7 @@ module Postgresql
27
27
 
28
28
  def dump_check_constraint(check)
29
29
  <<-RUBY.chomp
30
- add_check "#{remove_prefix_and_suffix(check.table_name)}", "#{check.condition}", name: "#{check.name}"
30
+ add_check "#{remove_prefix_and_suffix(check.table_name)}", "#{check.condition.gsub('"', '\"')}", name: "#{check.name}"
31
31
  RUBY
32
32
  end
33
33
  end
@@ -72,7 +72,7 @@ module Postgresql
72
72
  # @api private
73
73
  def checks(table_name)
74
74
  checks_info = select_all <<-SQL
75
- SELECT c.conname, c.consrc
75
+ SELECT DISTINCT c.conname, c.consrc
76
76
  FROM pg_constraint c
77
77
  INNER JOIN pg_class t
78
78
  ON c.conrelid = t.oid
@@ -1,5 +1,5 @@
1
1
  module Postgresql
2
2
  module Check
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postgresql-check
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
  - Alexei Mikhailov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-16 00:00:00.000000000 Z
11
+ date: 2017-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord