activerecord-rescue_from_duplicate 0.1.1 → 0.1.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad1109d6b48c9d16624a06e7262f80571d261b5e
|
4
|
+
data.tar.gz: 7fb9e9970bc575794559358c82be53d8667c5c92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c77fd19ff2d451ad3351c7c2058e76048df727dc5932648668687449960299fe9fa98ce44c1cf5ef0d36bc7955553810fc02240a3e43ccb31e5a87a37403d28
|
7
|
+
data.tar.gz: 52cc5da74eb6c2993042645e679af11209011a86392c4e2863e33af4919dcc1ffb087d5bcdfcad31f0874534c780a80f83288aa34fb5bf66851898e406a211a4
|
@@ -15,6 +15,7 @@ module RescueFromDuplicate
|
|
15
15
|
|
16
16
|
klasses.each do |klass|
|
17
17
|
klass._rescue_from_duplicate_handlers.each do |handler|
|
18
|
+
next unless klass.connection.table_exists?(klass.table_name)
|
18
19
|
unique_indexes = klass.connection.indexes(klass.table_name).select(&:unique)
|
19
20
|
|
20
21
|
unless unique_indexes.any? { |index| index.columns.map(&:to_s).sort == handler.columns }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-rescue_from_duplicate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guillaume Malette
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
190
|
version: '0'
|
191
191
|
requirements: []
|
192
192
|
rubyforge_project:
|
193
|
-
rubygems_version: 2.
|
193
|
+
rubygems_version: 2.5.1
|
194
194
|
signing_key:
|
195
195
|
specification_version: 4
|
196
196
|
summary: Rescue from MySQL and Sqlite duplicate errors when trying to insert records
|