All Versions
27
Latest Version
Avg Release Cycle
90 days
Latest Release
691 days ago

Changelog History
Page 2

  • v0.11.0 Changes

    June 12, 2019
    • ๐Ÿ›  Fix queries with joins by including the tenant column when current tenant isn't set
      • A common use case is having a filter on the tenant, but MultiTenant.with isn't used like Project.where(account_id: 1).eager_load(:categories). This version fixes the ORM call to include in the join: "project_categories"."account_id" = "projects"."account_id"
  • v0.10.0 Changes

    May 31, 2019
    • โž• Add MultiTenant.without to remove already set tenant context in a block #45 Jackson Miller
    • ๐Ÿ›  Fix uninitialized constant X::ActiveRecord::VERSION #42 vollnhals
    • ๐Ÿ›  Fix find and find_by caching issues
      • This builds on work by multiple contributors, and fixes issues where the tenant_id would be cached across different tenant contexts for find and find_by methods. This issue was only present with prepared statements turned on
      • Note that the mechanism to solve this is slightly different for Rails 4 and 5:
      • Rails 4: Disable any caching for find and find_by methods
      • Rails 5: Explicitly add the current_tenant_id into the cache key
      • This also ensures that we test both prepared statements on and off on Travis
    • โž• Added method to ensure that the current tenant is loaded #49 Stephen Bussey
      • This is ideal for fully utilizing the ActiveRecord extensions, as they only take effect when the current tenant is not an ID
    • โšก๏ธ Update loofah and rack to fix security warnings
      • Note that loofah is not a direct dependency of the libary, so this only applies when running the test suite
    • โœ‚ Remove monkey patch that previously disabled referential integrity (DISABLE/ENABLE TRIGGER ALL) #53 Rรฉmi Piotaix
  • v0.9.0 Changes

    June 22, 2018
  • v0.8.1 Changes

    October 06, 2017
    • Cast attribute name to a string to avoid double applying tenant clause Ben Olive
    • ๐Ÿ‘ Allow bulk delete/update with subqueries on joins Kyle Bock
  • v0.8.0 Changes

    August 16, 2017
    • Significant improvements and simplifications of query rewriting
      • Big thanks to Kyle Bock and Ben Olive for (re-)writing this code and verifying it works well
      • This fixes caching issues across multiple MultiTenant.with { } blocks when interacting with the Rails statement cache
    • โฌ‡๏ธ Drop support for Rails 3.2
      • The arel version used in Rails 3.2 has caused more trouble than its worth - it seems less troublesome to ask any users of this library to upgrade to at least Rails 4.0
  • v0.7.0 Changes

    July 18, 2017
    • Switch back to Relation-based mechanism of hooking into ActiveRecord (this resolves issues for simple queries that didn't get rewritten)
    • Query rewriter improvements
      • Handle OUTER JOIN correctly
      • Correctly rewrite sub-selects
    • Model tenant method: Only return cached object if not loaded
    • ๐Ÿ›  Fix support for inherited model classes that only have multi-tenant on a higher level object Aaron Severs #13
    • ๐Ÿ‘ท Sidekiq middleware: Don't automatically perform a find for the tenant object for every job Scott Mitchell #14
    • ๐Ÿ›  Fix automatic inverse of on singular associations Kyle Bock #15
    • ๐Ÿ›  Fix bug that prevents fast truncate from running Kyle Bock #17
  • v0.6.0 Changes

    June 09, 2017
    • Query rewriter
      • Change hook from per-relation to be pre-SQL statement thats being output
      • This should resolve issues where we added conditions in the wrong place
      • Use table name to model klass registry
    • ๐Ÿ‘Œ Improve tests for activerecord-multi-tenant
      • Use lower shard count to speed up tests
      • Drop database cleaner dependency
  • v0.5.0 Changes

    May 08, 2017
    • Write-only mode that enables step-by-step migrations
    • 0๏ธโƒฃ Add tenant_id to queries using rewrite instead of default_scope/unscoped Ben Olive
    • Query monitor that warns you about missing tenant_id
    • Helper for fast truncation
    • Sidekiq middleware
  • v0.4.1 Changes

    March 23, 2017
    • ๐Ÿ‘ Allow use outside of Rails, e.g. when using Sinatra with ActiveRecord @nathanstitt #5
  • v0.4.0 Changes

    March 22, 2017
    • Infer multi_tenant setting from parent classes @webandtech #6
    • โœ‚ Remove use of global tenant klass variable @webandtech #6
    • ๐Ÿ‘Œ Support passing ID values to MultiTenant.with directly @webandtech #6
      • This effectively deprecates with_id, but we'll keep it around for now
    • โœ‚ Remove unnecessary validation for invalid belongs_to association