Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b22ae3d

Browse files
committedJan 10, 2025··
Update appraisals
Require Rails >= 7.1 with native composite primary key support
1 parent 155482a commit b22ae3d

6 files changed

+4
-36
lines changed
 

‎.github/workflows/active-record-multi-tenant-tests.yml

-6
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,9 @@ jobs:
4949
- '3.2'
5050
- '3.3'
5151
appraisal:
52-
- rails-6.0
53-
- rails-6.1
54-
- rails-7.0
5552
- rails-7.1
5653
- rails-7.2
5754
- rails-8.0
58-
- active-record-6.0
59-
- active-record-6.1
60-
- active-record-7.0
6155
- active-record-7.1
6256
- active-record-7.2
6357
- active-record-8.0

‎.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ Gemfile.lock
99
Vagrantfile
1010
coverage/
1111
docs/build/
12-
.yardoc/
12+
.yardoc/
13+
.tool-versions

‎Appraisals

-24
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
# frozen_string_literal: true
22

3-
appraise 'rails-6.0' do
4-
gem 'rails', '~> 6.0.3'
5-
end
6-
7-
appraise 'rails-6.1' do
8-
gem 'rails', '~> 6.1.0'
9-
end
10-
11-
appraise 'rails-7.0' do
12-
gem 'rails', '~> 7.0.0'
13-
end
14-
153
appraise 'rails-7.1' do
164
gem 'rails', '~> 7.1.0'
175
end
@@ -24,18 +12,6 @@ appraise 'rails-8.0' do
2412
gem 'rails', '~> 8.0.0'
2513
end
2614

27-
appraise 'active-record-6.0' do
28-
gem 'activerecord', '~> 6.0.3'
29-
end
30-
31-
appraise 'active-record-6.1' do
32-
gem 'activerecord', '~> 6.1.0'
33-
end
34-
35-
appraise 'active-record-7.0' do
36-
gem 'activerecord', '~> 7.0.0'
37-
end
38-
3915
appraise 'active-record-7.1' do
4016
gem 'activerecord', '~> 7.1.0'
4117
end

‎Gemfile

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ source 'https://rubygems.org'
44

55
gemspec
66
gem 'appraisal'
7-
gem 'composite_primary_keys', '~> 14.0.9'
87
gem 'rubocop', require: false, group: 'test'
98
gem 'simplecov'
109
gem 'simplecov-cobertura'

‎activerecord-multi-tenant.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
1919
spec.homepage = 'https://github.com/citusdata/activerecord-multi-tenant'
2020
spec.license = 'MIT'
2121

22-
spec.add_dependency 'rails', '>= 6'
22+
spec.add_dependency 'rails', '>= 7.1'
2323

2424
spec.add_development_dependency 'anbt-sql-formatter'
2525
spec.add_development_dependency 'codecov'

‎spec/schema.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,8 @@ class Page < ActiveRecord::Base
284284
belongs_to :domain
285285
end
286286

287-
require 'composite_primary_keys'
288-
289287
class CompositeKeyModel < ActiveRecord::Base
290-
self.primary_keys = :account_id, :secondary_id
288+
self.primary_key = :account_id, :secondary_id
291289
multi_tenant :account
292290

293291
validates_uniqueness_of :name, scope: %i[account_id secondary_id]

0 commit comments

Comments
 (0)
Please sign in to comment.