Skip to content

Commit

Permalink
Merge pull request #821 from zdennis/releases/v1.5.1
Browse files Browse the repository at this point in the history
Release v1.5.1
  • Loading branch information
jkowens committed Nov 18, 2023
2 parents 9616c6d + 3e12169 commit 14a88ba
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Changes in 1.5.1

### Fixes

* Stop memoizing schema_columns_hash so dynamic schema changes are picked up. Thanks to @koshigoe via \##812.

## Changes in 1.5.0

### New Features
Expand Down
2 changes: 1 addition & 1 deletion lib/activerecord-import/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module ActiveRecord
module Import
VERSION = "1.5.0"
VERSION = "1.5.1"
end
end
2 changes: 1 addition & 1 deletion test/models/book.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class Book < ActiveRecord::Base
belongs_to :topic, inverse_of: :books
belongs_to :tag, foreign_key: [:tag_id, :parent_id]
belongs_to :tag, foreign_key: [:tag_id, :parent_id] unless ENV["SKIP_COMPOSITE_PK"]

has_many :chapters, inverse_of: :book
has_many :discounts, as: :discountable
Expand Down
10 changes: 6 additions & 4 deletions test/models/customer.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# frozen_string_literal: true

class Customer < ActiveRecord::Base
has_many :orders,
inverse_of: :customer,
primary_key: %i(account_id id),
foreign_key: %i(account_id customer_id)
unless ENV["SKIP_COMPOSITE_PK"]
has_many :orders,
inverse_of: :customer,
primary_key: %i(account_id id),
foreign_key: %i(account_id customer_id)
end
end
10 changes: 6 additions & 4 deletions test/models/order.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# frozen_string_literal: true

class Order < ActiveRecord::Base
belongs_to :customer,
inverse_of: :orders,
primary_key: %i(account_id id),
foreign_key: %i(account_id customer_id)
unless ENV["SKIP_COMPOSITE_PK"]
belongs_to :customer,
inverse_of: :orders,
primary_key: %i(account_id id),
foreign_key: %i(account_id customer_id)
end
end
4 changes: 3 additions & 1 deletion test/models/tag_alias.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

class TagAlias < ActiveRecord::Base
belongs_to :tag, foreign_key: [:tag_id, :parent_id], required: true
unless ENV["SKIP_COMPOSITE_PK"]
belongs_to :tag, foreign_key: [:tag_id, :parent_id], required: true
end
end

0 comments on commit 14a88ba

Please sign in to comment.