database_validations 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/database_validations/helpers.rb +2 -2
- data/lib/database_validations/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bccd15f47c53c05f114d5b3df06142353c216ff39f4d8468c6f1b483f383aa80
|
4
|
+
data.tar.gz: f8bdfafb7fa77ab9dfba3922bf1ca999d5b6d4d0ec7df6aa0c71cf090bc67466
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6929c579900726f0ab6d42986ddf80d8eb0f386f61ebe5fb78ea550c4b85c7eadecb9fb594ce99ba8460b98e5942a5bfdb58d5491a9eff87028841a8acd74d18
|
7
|
+
data.tar.gz: e172acf343ef11c53d43835f4af8a39b03247af6e18e01be4da5ea7d4a4ad758a799990d8ad35a34a69fb62af04fdcbf28fd1a6330ef6764d4a16bb7901c24c2
|
@@ -3,8 +3,8 @@ module DatabaseValidations
|
|
3
3
|
module_function
|
4
4
|
|
5
5
|
def raise_if_index_missed!(model, columns)
|
6
|
-
|
7
|
-
|
6
|
+
connection = model.connection rescue return
|
7
|
+
index = connection.indexes(model.table_name)
|
8
8
|
.select(&:unique)
|
9
9
|
.find { |index| index.columns.map(&:to_s).sort == columns }
|
10
10
|
|