forked from mikecmpbll/apartment
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BP-2147 | Hotfix: Added support for Rails 6 multi-database switching (#1
) This fixes two issues with Apartment's compatibility with Rails 6: 1. Migrations on tenant-specific databases appear to have been broken since at least Rails v6.0.0.beta1 due to a change in the way the connections are switched. Migrations now appear to run successfully in development after explicitly setting the connection_specification_name. 2. Testing concurrent threads with long-running transactions could result in dead-lock as of Rails v6.0.0.rc2 as threads now properly share connections during testing by default and Apartment appears to not be clearing the query caches for all active connections. These deadlocks no longer occur with the change to clear all connections' query caches for the current thread instead of just the current connection's query cache.
- Loading branch information
1 parent
16f6c97
commit dd5d4ac
Showing
3 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,32 @@ | ||
addons: | ||
postgresql: 9.6 | ||
dist: trusty | ||
language: ruby | ||
cache: bundler | ||
|
||
rvm: | ||
- 2.2.4 | ||
- 2.3.1 | ||
- 2.6.3 | ||
- jruby-9.0.5.0 | ||
|
||
gemfile: | ||
- gemfiles/rails_5_1.gemfile | ||
|
||
bundler_args: --without local | ||
before_install: | ||
- gem install bundler -v '> 1.5.0' | ||
- gem update --system | ||
- gem install bundler | ||
|
||
before_script: | ||
- psql -c 'create database apartment_postgresql_test;' -U postgres | ||
|
||
env: | ||
RUBY_GC_MALLOC_LIMIT: 90000000 | ||
RUBY_FREE_MIN: 200000 | ||
|
||
matrix: | ||
fast_finish: true | ||
|
||
notifications: | ||
email: | ||
on_success: never | ||
on_failure: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module Apartment | ||
VERSION = "2.0.0" | ||
VERSION = "2.0.1" | ||
end |