activerecord-pg-extensions 0.5.0 → 0.5.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: 05fb32b33134833c55a06810bf8015c335d2e7fe85b59cbd6910b90141a88fec
4
- data.tar.gz: 5663306168a18e60f0e5acd439f35ce439f1108c9074430868d7a346db937e78
3
+ metadata.gz: 76b26256a900d896712a2a43efa814c763713055ebdd211b297e03d7c692804b
4
+ data.tar.gz: 041a0b3f8c943c47133b45d837128ccd5ba59f7329ce53ca92effbfee85d9f63
5
5
  SHA512:
6
- metadata.gz: 8f3541b26c2071c1176bd27a1978abd3b5972091e0cc36e55524a042589655817c2b55a087d85a4f0a216ee889a629076ccf7fabb242961a913e122c36256926
7
- data.tar.gz: fc4b5af43db911db62b51d72c1e86e76c2bb2506c81d8a61f8f81b6e47aa735451236f1ddc69c2865932c6ca182224f7629a1900d715ed581e163ef4a3af28c9
6
+ metadata.gz: 2fafc2346380c64d7a324efee4169912fa87cf088142007d5fb4d13ea2a7f783d6374473a3a51710685204e00e4dde7e4ec895e6bd1daab869087dd8fa89c2a6
7
+ data.tar.gz: c984f81a6faccbf6d8634051703647816811b6c8fb4aa827c2a70f05964e6583f8a2abbf69d5f083af4e9eee5cd2c22a4e898a43613c36e99263f39b809e7154
@@ -90,14 +90,16 @@ module ActiveRecord
90
90
  end
91
91
 
92
92
  def add_check_constraint(table_name, expression, if_not_exists: false, **options)
93
- return if if_not_exists && check_constraint_for(table_name, expression, **options)
93
+ options = check_constraint_options(table_name, expression, options)
94
+ return if if_not_exists && check_constraint_for(table_name, **options)
94
95
 
95
96
  super
96
97
  end
97
98
 
98
99
  if ActiveRecord.version < Gem::Version.new("7.1")
99
- def remove_check_constraint(table_name, expression = nil, **options)
100
- return if options[:if_exists] && !check_constraint_for(table_name, expression, **options)
100
+ def remove_check_constraint(table_name, expression = nil, if_exists: false, **options)
101
+ options = check_constraint_options(table_name, expression, options)
102
+ return if if_exists && !check_constraint_for(table_name, **options)
101
103
 
102
104
  super
103
105
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveRecord
4
4
  module PGExtensions
5
- VERSION = "0.5.0"
5
+ VERSION = "0.5.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-pg-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-06 00:00:00.000000000 Z
11
+ date: 2023-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord