database_consistency 0.8.3 → 0.8.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
2
  SHA256:
3
- metadata.gz: 5015849cbfceb5d46a68ab0c3f9ba0e620fffbf013c16af563d3aa8fd16b140f
4
- data.tar.gz: dd379822c590457db98fd9f23fe99f19868063cf994e804eec11fe61b7311105
3
+ metadata.gz: 0f88361846480fa9257f1a17799b54f60e9e44630b81f3e0612ce9a8bd2ee8ca
4
+ data.tar.gz: bbe851973d91592ab4156cb12da0dd0a3fc33d429c9c5521e3d4be9fc1c3f380
5
5
  SHA512:
6
- metadata.gz: 3ec317d549f0852e6396db14f7263904448a3dda2c2515f83a174946a9d8138163f909b078a235a41c5d36daa01bbc38cd61c03f23921d3ad8704c7742e7fcec
7
- data.tar.gz: 8c41bdf53040283417a3d616e9cf9b13a34138ba17edf65b84df1506e630e758d88995a618ea2b111a8d45884c49bf8b4e5f9b2c38e16fbfdd379328260aa0f1
6
+ metadata.gz: 13b9a733d87f4f840afc7e87d284ddea367cf6bbd7bacf10a496dea82d2cc782427eb3bcad4b1926f633dad79f36ccc7afbdc9463c2a68ccde5e07ce76a85019
7
+ data.tar.gz: fbc37a0a3764eea67df7733d4bebd40a5f1f3ddb1019998de08f6e71610350e4b4bf44f9896ea939de013b3ac5bc0630bbbaae8176189e095fbefde0420aee18
@@ -21,8 +21,14 @@ module DatabaseConsistency
21
21
  # We skip check when:
22
22
  # - column hasn't limit constraint
23
23
  # - column insn't string nor text
24
+ # - column is array (PostgreSQL only)
24
25
  def preconditions
25
- !column.limit.nil? && %i[string text].include?(column.type)
26
+ !column.limit.nil? && %i[string text].include?(column.type) && !postgresql_array?
27
+ end
28
+
29
+ # @return [Boolean] true if it is an array (PostgreSQL only)
30
+ def postgresql_array?
31
+ column.respond_to?(:array) && column.array
26
32
  end
27
33
 
28
34
  # Table of possible statuses
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DatabaseConsistency
4
- VERSION = '0.8.3'
4
+ VERSION = '0.8.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: database_consistency
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeniy Demin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-24 00:00:00.000000000 Z
11
+ date: 2020-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord