database_consistency 2.0.2 → 2.0.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10a47440f23b099f99610cd51a5150d741c36f439db1b41ed013c7e471d055e2
|
4
|
+
data.tar.gz: d41e1338822d6bde0dda339d1be9f1e719559c493d6ed93df2fe430457155ef9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48cffa667822acc96791b45f2c5821cd3920ed217d451340361d8184dac927843755940443e2e4506358847736687aab5d4adbe1c68e5f3db08da35d9b9a1ff9
|
7
|
+
data.tar.gz: bfe3e7df7e47c4988aeae5fe9c2157786c221047fec5a0f9f435457020f65d99ebb2722c94ddce4204ed84a49ffdab8849fc85ab5e282d39722bcf68ddd4e9cd
|
@@ -34,11 +34,15 @@ module DatabaseConsistency
|
|
34
34
|
].compact
|
35
35
|
end
|
36
36
|
|
37
|
-
def enum_column_values
|
38
|
-
@enum_column_values ||=
|
39
|
-
|
40
|
-
|
41
|
-
|
37
|
+
def enum_column_values # rubocop:disable Metrics/AbcSize
|
38
|
+
@enum_column_values ||=
|
39
|
+
if model.connection.enum_types.is_a?(Array)
|
40
|
+
_, values = model.connection.enum_types.find { |(enum, _)| enum == column.sql_type }
|
41
|
+
values.split(',').map(&:strip)
|
42
|
+
else
|
43
|
+
# active_record-postgres_enum gem
|
44
|
+
model.connection.enum_types[column.sql_type.to_sym]
|
45
|
+
end
|
42
46
|
end
|
43
47
|
|
44
48
|
def verify_enum
|
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: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evgeniy Demin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|