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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7c3f11bd0b6a20ebd9cbcbe9134ae84e049c53e13d0a67faaa3da570994adc8
4
- data.tar.gz: 1a45078331bccc6a9fdd6e59426b766dce95375ec9ffa7ac3130bb91df86f761
3
+ metadata.gz: bccd15f47c53c05f114d5b3df06142353c216ff39f4d8468c6f1b483f383aa80
4
+ data.tar.gz: f8bdfafb7fa77ab9dfba3922bf1ca999d5b6d4d0ec7df6aa0c71cf090bc67466
5
5
  SHA512:
6
- metadata.gz: 75563aa5561d03288ae9dbe9b38e5fc8d87955f9227150d0c3d782eb42bf02e12d259d2614c4e35d2dd344958bb306ba87a66f46747b04608b5082c5f430210e
7
- data.tar.gz: 00f656712648b20f62d90d72db0b233e8f69d6a552e9adc7eb42c45cd85d2f17622812776223990dae9aea21ed42d586719cdff4a030eff25218cfde513c8b7e
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
- index = model.connection
7
- .indexes(model.table_name)
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
 
@@ -1,3 +1,3 @@
1
1
  module DatabaseValidations
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: database_validations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeniy Demin