active_record-postgres-constraints 0.1.3 → 0.1.4
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6aeacf5cb93d55fa32a6b5465690a9358f0be891180d2ff27f65a52652d78f1e
|
|
4
|
+
data.tar.gz: afbc4076848545568c6cd6d98fd6092d61fa426a22978b13c338bb5b3c7bc07a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c2c3d16541ed93f4b2ec66ef4cca8e1286ba7fc2c1a85cd9f3323026e1ad922ff6882c30aa67a790c90792943aea1d0683981c03747938e0ccac872a64198c42
|
|
7
|
+
data.tar.gz: 30fa7b3dd99e4904a4ee832eb32c2a06246359427f83940b18124e56475063745ae43a9a7e62208ee99da5d073691957e5456c6464316e0415b079b2dcc500ea
|
|
@@ -26,18 +26,8 @@ module ActiveRecord
|
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
def pg?
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
rescue ActiveRecord::NoDatabaseError
|
|
32
|
-
Rails.logger.warn do
|
|
33
|
-
'Not applying Postgres Constraints patches to ActiveRecord ' \
|
|
34
|
-
'since the database does not exist'
|
|
35
|
-
end
|
|
36
|
-
return false
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
pg = connection.class.to_s == "#{AR_CAS}::PostgreSQLAdapter"
|
|
40
|
-
return true if pg
|
|
29
|
+
config = ActiveRecord::Base.connection_config
|
|
30
|
+
return true if config && 'postgresql' == config[:adapter]
|
|
41
31
|
|
|
42
32
|
Rails.logger.warn do
|
|
43
33
|
'Not applying Postgres Constraints patches to ActiveRecord ' \
|