activerecord-multi-tenant 2.1.3 → 2.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29d653eb35952bb70e983799cae4b5c88fdcbf852e1ba16a730362a01f18d327
4
- data.tar.gz: 6fa61c33ed3f99eff5d214f195544547ac67bf4d81d60adbe18c4d1ecb7432a9
3
+ metadata.gz: eac7c3d60913d1596d061cdca9fca210c2f5e44eb87c60fe55a65f05161840fa
4
+ data.tar.gz: b183e17a1effb9ad711e784a4ae82be5eb209b8b6d84993cfe4ea5db5c2fe800
5
5
  SHA512:
6
- metadata.gz: 0f9b6bc791de06c8c3cfef7cd4f458cebe9412bbe0baf01f3ff102636810a3fa6b2f1ec63aacfd9c4989956f14fa78b4a29d862d399ae634cf44def50db7f594
7
- data.tar.gz: 46dcda19e38662c310d4c149f01151422461157c16012a07060f64735667d75ff1040956db0b7428ff7a76c2ee84b56facd77c86b063bfffed65e44341a37323
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 4.2 or newer (up to 6.0) are supported.
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 ActiveRecord::Migration.citus_version.present?
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
@@ -1,3 +1,3 @@
1
1
  module MultiTenant
2
- VERSION = '2.1.3'
2
+ VERSION = '2.1.4'
3
3
  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.3
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-10-27 00:00:00.000000000 Z
11
+ date: 2022-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails