activerecord-multi-tenant 2.1.3 → 2.1.4
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +1 -1
- data/lib/activerecord-multi-tenant/migrations.rb +7 -1
- data/lib/activerecord-multi-tenant/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eac7c3d60913d1596d061cdca9fca210c2f5e44eb87c60fe55a65f05161840fa
|
|
4
|
+
data.tar.gz: b183e17a1effb9ad711e784a4ae82be5eb209b8b6d84993cfe4ea5db5c2fe800
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3892fefdeb8636a7ceb80d5538cf49c73f7baf9957226f59156b8cfdceacd92760392aba0eee8232f17a9604eed1b502b9257c0df0614882e2d948afb64398ce
|
|
7
|
+
data.tar.gz: b79eb29f19b1b5c2f3320fc3b79bc6fc8baa64a5217059a093e6fce77884280a9f9f67be2d1f842e620addfa61711704a63052c8b75c2ad3de68cd3c4e7a8407
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.1.4 2022-11-03
|
|
4
|
+
* Fixes #166 where db:schema:dump is broken when using this gem with MySQL [#167](https://github.com/citusdata/activerecord-multi-tenant/pull/167)
|
|
5
|
+
|
|
3
6
|
## 2.1.3 2022-10-27
|
|
4
7
|
* Error when calling a method that takes keyword arguments with MultiTenant.wrap_methods [#164](https://github.com/citusdata/activerecord-multi-tenant/pull/164)
|
|
5
8
|
|
data/README.md
CHANGED
|
@@ -16,7 +16,7 @@ gem 'activerecord-multi-tenant'
|
|
|
16
16
|
|
|
17
17
|
## Supported Rails versions
|
|
18
18
|
|
|
19
|
-
All Ruby on Rails versions starting with
|
|
19
|
+
All Ruby on Rails versions starting with 5.2 or newer (up to 7.0) are supported.
|
|
20
20
|
|
|
21
21
|
This gem only supports ActiveRecord (the Rails default ORM), and not alternative ORMs like Sequel.
|
|
22
22
|
|
|
@@ -89,8 +89,14 @@ module ActiveRecord
|
|
|
89
89
|
def initialize(connection, options = {})
|
|
90
90
|
initialize_without_citus(connection, options)
|
|
91
91
|
|
|
92
|
+
citus_version = begin
|
|
93
|
+
ActiveRecord::Migration.citus_version
|
|
94
|
+
rescue StandardError
|
|
95
|
+
# Handle the case where this gem is used with MySQL https://github.com/citusdata/activerecord-multi-tenant/issues/166
|
|
96
|
+
nil
|
|
97
|
+
end
|
|
92
98
|
@distribution_columns =
|
|
93
|
-
if
|
|
99
|
+
if citus_version.present?
|
|
94
100
|
@connection.execute('SELECT logicalrelid::regclass AS table_name, column_to_column_name(logicalrelid, partkey) AS dist_col_name FROM pg_dist_partition').to_h do |v|
|
|
95
101
|
[v['table_name'], v['dist_col_name']]
|
|
96
102
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activerecord-multi-tenant
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Citus Data
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-11-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|