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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f88361846480fa9257f1a17799b54f60e9e44630b81f3e0612ce9a8bd2ee8ca
|
4
|
+
data.tar.gz: bbe851973d91592ab4156cb12da0dd0a3fc33d429c9c5521e3d4be9fc1c3f380
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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-
|
11
|
+
date: 2020-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|