abstract_importer 1.4.1 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/abstract_importer.gemspec +1 -1
- data/lib/abstract_importer/strategies/upsert_strategy.rb +1 -1
- data/lib/abstract_importer/version.rb +1 -1
- data/test/support/schema.rb +7 -7
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75b8682cc7102c4700ff606c17d5761a3bd93bfe
|
4
|
+
data.tar.gz: a79b16c14e77b902400ce9a6149a4629d5b3d2d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 260320a2d92c89d560866290b1871499ef2bbb83a64ec669cd1fd6b6e0d686b08813b785214c4f3bdbd246aa34d81c190a2f957f79ed53904aa3d9cdda000477
|
7
|
+
data.tar.gz: 11d5dbffe9b22088cdaa785ceb2c764055c465beb6afc87ddbf7163143ad083bb17672cef4b54d0a563669e4ef1ceedd4b4884a8c872d2a586c3aab154e85c70
|
data/Gemfile
CHANGED
data/abstract_importer.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
|
20
20
|
spec.add_dependency "activerecord", ">= 5.0"
|
21
21
|
spec.add_dependency "activesupport", ">= 5.0"
|
22
|
-
spec.add_dependency "activerecord-insert_many", ">= 0.4.
|
22
|
+
spec.add_dependency "activerecord-insert_many", ">= 0.4.1"
|
23
23
|
spec.add_dependency "progressbar"
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.3"
|
@@ -7,7 +7,7 @@ module AbstractImporter
|
|
7
7
|
|
8
8
|
def initialize(collection, options={})
|
9
9
|
super
|
10
|
-
@insert_options.merge!(on_conflict: { column: remap_ids? ? :legacy_id : :id, do: :update })
|
10
|
+
@insert_options.merge!(on_conflict: { column: remap_ids? ? (association_attrs.keys + [:legacy_id]) : :id, do: :update })
|
11
11
|
end
|
12
12
|
|
13
13
|
# We won't skip any records for already being imported
|
data/test/support/schema.rb
CHANGED
@@ -11,7 +11,7 @@ ActiveRecord::Schema.define(:version => 1) do
|
|
11
11
|
t.string "pet_type"
|
12
12
|
t.integer "pet_id"
|
13
13
|
t.index "name", :unique => true
|
14
|
-
t.index "legacy_id", :unique => true
|
14
|
+
t.index ["account_id", "legacy_id"], :unique => true
|
15
15
|
end
|
16
16
|
|
17
17
|
create_table "parents", :force => true do |t|
|
@@ -19,14 +19,14 @@ ActiveRecord::Schema.define(:version => 1) do
|
|
19
19
|
t.integer "student_id"
|
20
20
|
t.integer "legacy_id"
|
21
21
|
t.string "name"
|
22
|
-
t.index "legacy_id", :unique => true
|
22
|
+
t.index ["account_id", "legacy_id"], :unique => true
|
23
23
|
end
|
24
24
|
|
25
25
|
create_table "locations", :force => true do |t|
|
26
26
|
t.integer "account_id"
|
27
27
|
t.integer "legacy_id"
|
28
28
|
t.string "slug"
|
29
|
-
t.index "legacy_id", :unique => true
|
29
|
+
t.index ["account_id", "legacy_id"], :unique => true
|
30
30
|
end
|
31
31
|
|
32
32
|
create_table "students_subjects", :force => true do |t|
|
@@ -38,7 +38,7 @@ ActiveRecord::Schema.define(:version => 1) do
|
|
38
38
|
t.integer "account_id"
|
39
39
|
t.integer "legacy_id"
|
40
40
|
t.string "name"
|
41
|
-
t.index "legacy_id", :unique => true
|
41
|
+
t.index ["account_id", "legacy_id"], :unique => true
|
42
42
|
end
|
43
43
|
|
44
44
|
create_table "grades", :force => true do |t|
|
@@ -47,21 +47,21 @@ ActiveRecord::Schema.define(:version => 1) do
|
|
47
47
|
t.integer "student_id"
|
48
48
|
t.integer "legacy_id"
|
49
49
|
t.string "value"
|
50
|
-
t.index "legacy_id", :unique => true
|
50
|
+
t.index ["account_id", "legacy_id"], :unique => true
|
51
51
|
end
|
52
52
|
|
53
53
|
create_table "owls", :force => true do |t|
|
54
54
|
t.integer "account_id"
|
55
55
|
t.integer "legacy_id"
|
56
56
|
t.string "name"
|
57
|
-
t.index "legacy_id", :unique => true
|
57
|
+
t.index ["account_id", "legacy_id"], :unique => true
|
58
58
|
end
|
59
59
|
|
60
60
|
create_table "cats", :force => true do |t|
|
61
61
|
t.integer "account_id"
|
62
62
|
t.integer "legacy_id"
|
63
63
|
t.string "name"
|
64
|
-
t.index "legacy_id", :unique => true
|
64
|
+
t.index ["account_id", "legacy_id"], :unique => true
|
65
65
|
end
|
66
66
|
|
67
67
|
create_table "abilities", :force => true do |t|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abstract_importer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Lail
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.4.
|
47
|
+
version: 0.4.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.4.
|
54
|
+
version: 0.4.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: progressbar
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|