activerecord-import 3.0.0 → 3.0.1
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: a217f5193e7780d4c88097d2b57af11f756fe805067d6209d1fe66e2469471b2
|
|
4
|
+
data.tar.gz: 8d64e43716f2e83b06a5221d7a7a7356b1f7f86d62d6ba84e10474b9fd67e246
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2345d3ab1dc21d0aef164285b008b85a3568afcd69c938a106bea1eadc7ac87a429e1f5234bcd5649c508343a702c35e25b5e7d6841bfd79ace21dd4bb2b46a6
|
|
7
|
+
data.tar.gz: 4ac0791171aef53c39a5da7c5de38c9af9d5f2f7a1cd069293cbc886f8a981014e9d66bf4583a57a86afd05081aa58a92e9fa7689edddb778ccc073a9f805c5a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## Changes in 3.0.1
|
|
2
|
+
|
|
3
|
+
### Fixes
|
|
4
|
+
|
|
5
|
+
* Fix `synchronize` raising `NoMethodError` (undefined method `clear_aggregation_cache`) for models
|
|
6
|
+
that don't use `composed_of`. This regressed in 3.0.0. Fixes #951 via #952.
|
|
7
|
+
* Quote the primary key that SQLite uses as the default `ON CONFLICT` target, so
|
|
8
|
+
`on_duplicate_key_update` works when the primary key is named after a reserved word such as
|
|
9
|
+
`order`. Thanks to @TakuyaKurimoto via #950.
|
|
10
|
+
|
|
11
|
+
### Development
|
|
12
|
+
|
|
13
|
+
* Get the benchmarks running again on Ruby 3.4 and Rails 8. via #949.
|
|
14
|
+
|
|
1
15
|
## Changes in 3.0.0
|
|
2
16
|
|
|
3
17
|
### Breaking Changes
|
|
@@ -169,7 +169,7 @@ module ActiveRecord::Import::SQLite3Adapter
|
|
|
169
169
|
end
|
|
170
170
|
|
|
171
171
|
def sql_for_default_conflict_target( primary_key )
|
|
172
|
-
conflict_target = Array(primary_key).join(', ')
|
|
172
|
+
conflict_target = Array(primary_key).map { |key| quote_column_name(key) }.join(', ')
|
|
173
173
|
"(#{conflict_target}) " if conflict_target.present?
|
|
174
174
|
end
|
|
175
175
|
|
|
@@ -60,7 +60,8 @@ module ActiveRecord # :nodoc:
|
|
|
60
60
|
next false unless matched_instance
|
|
61
61
|
|
|
62
62
|
instance.instance_variable_set :@association_cache, {}
|
|
63
|
-
|
|
63
|
+
# Aggregations is only included in models that call composed_of
|
|
64
|
+
instance.send :clear_aggregation_cache if instance.respond_to?(:clear_aggregation_cache, true)
|
|
64
65
|
yield instance, matched_instance.instance_variable_get(:@attributes)
|
|
65
66
|
|
|
66
67
|
# Since the instance now accurately reflects the record in
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activerecord-import
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zach Dennis
|
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
100
100
|
- !ruby/object:Gem::Version
|
|
101
101
|
version: '0'
|
|
102
102
|
requirements: []
|
|
103
|
-
rubygems_version:
|
|
103
|
+
rubygems_version: 3.6.9
|
|
104
104
|
specification_version: 4
|
|
105
105
|
summary: Bulk insert extension for ActiveRecord
|
|
106
106
|
test_files: []
|