postgresql-check 0.1.3 → 0.1.4

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
- SHA1:
3
- metadata.gz: 4be93ea593cfc45bd697bfc9a80ad8d59aa3c5a0
4
- data.tar.gz: c197ae4bcffd2e2752a80e6a10681ccee9f1f0df
2
+ SHA256:
3
+ metadata.gz: 61d5f5a4b67adddf360c33500c6a3cf498201334cb86c26ce99ab832b65081d0
4
+ data.tar.gz: 7fb4f68ef50a37c3cae314366feaec009c0b7c669dbfd8d807790736e6790588
5
5
  SHA512:
6
- metadata.gz: f208e43095c3d6daa23035df70283f439503ca4a0e2c2c7abb759944d2229c028957a960eb514c9fe86df56c4e5600f3edd53fe982a946528fd2e793192a29c5
7
- data.tar.gz: 89929415522dc9c82c3be7cd0c07a3418e77b5bcaa0a3c7e2e18d4774ffb86c730e96dbbb1108ddbd15377cb91fde9ccfe5fe774aa9156d27440dcdc14c3d4ba
6
+ metadata.gz: 96198a7338c71a6da59ccb797ba776ad09940b462700e130052fe13df21327e239634a035bd722f239bfa9507dec97887b875caabe456bdcd651df01e90d86c6
7
+ data.tar.gz: 1a5068c2994722ae81183b0ee875e767b6696891c5d6865cbe632ff8b3500d246d0f675be1372a137569e800bfba67e747f7af9700c79c7b1f8ecb5e8dd9e9d5
@@ -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 DISTINCT c.conname, c.consrc
75
+ SELECT DISTINCT c.conname, pg_get_expr(c.conbin, c.conrelid) check_expr
76
76
  FROM pg_constraint c
77
77
  INNER JOIN pg_class t
78
78
  ON c.conrelid = t.oid
@@ -81,7 +81,7 @@ module Postgresql
81
81
  SQL
82
82
 
83
83
  checks_info.map do |row|
84
- Constraint.new table_name, row['conname'], row['consrc']
84
+ Constraint.new table_name, row['conname'], row['check_expr']
85
85
  end
86
86
  end
87
87
  end
@@ -1,5 +1,5 @@
1
1
  module Postgresql
2
2
  module Check
3
- VERSION = '0.1.3'
3
+ VERSION = '0.1.4'
4
4
  end
5
5
  end
@@ -19,5 +19,5 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.add_dependency 'activerecord', '>= 3.2.0'
21
21
  spec.add_development_dependency 'bundler', '~> 1.7'
22
- spec.add_development_dependency 'rake', '~> 10.0'
22
+ spec.add_development_dependency 'rake', '~> 13.0'
23
23
  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.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexei Mikhailov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-26 00:00:00.000000000 Z
11
+ date: 2020-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: '13.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: '13.0'
55
55
  description:
56
56
  email:
57
57
  - amikhailov83@gmail.com
@@ -93,8 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  - !ruby/object:Gem::Version
94
94
  version: '0'
95
95
  requirements: []
96
- rubyforge_project:
97
- rubygems_version: 2.4.8
96
+ rubygems_version: 3.0.8
98
97
  signing_key:
99
98
  specification_version: 4
100
99
  summary: Adds helpers to migrations and dumps check constraints to schema.rb