diff --git a/.travis.yml b/.travis.yml index 78067b58..cefc8560 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,10 @@ -sudo: required +os: linux + language: ruby services: - docker rvm: - - jruby-9.1.15.0 + - jruby-9.1.17.0 - 2.1.9 - 2.2.9 - 2.3.6 @@ -29,11 +30,11 @@ before_install: env: RUBY_GC_MALLOC_LIMIT: 90000000 RUBY_GC_HEAP_FREE_SLOTS: 200000 -matrix: +jobs: allow_failures: - rvm: ruby-head - gemfile: gemfiles/rails_master.gemfile - - rvm: jruby-9.1.15.0 + - rvm: jruby-9.1.17.0 gemfile: gemfiles/rails_5_0.gemfile exclude: - rvm: 2.1.9 @@ -46,19 +47,19 @@ matrix: gemfile: gemfiles/rails_6_0.gemfile - rvm: 2.1.9 gemfile: gemfiles/rails_master.gemfile - - rvm: 2.2.9 + - rvm: 2.2.9 gemfile: gemfiles/rails_6_0.gemfile - rvm: 2.3.6 gemfile: gemfiles/rails_6_0.gemfile - rvm: 2.4.3 gemfile: gemfiles/rails_6_0.gemfile - - rvm: jruby-9.1.15.0 + - rvm: jruby-9.1.17.0 gemfile: gemfiles/rails_5_1.gemfile - - rvm: jruby-9.1.15.0 + - rvm: jruby-9.1.17.0 gemfile: gemfiles/rails_5_2.gemfile - - rvm: jruby-9.1.15.0 + - rvm: jruby-9.1.17.0 gemfile: gemfiles/rails_6_0.gemfile - - rvm: jruby-9.1.15.0 + - rvm: jruby-9.1.17.0 gemfile: gemfiles/rails_master.gemfile fast_finish: true cache: bundler diff --git a/Gemfile b/Gemfile index 6c13b34a..bdbf6fe1 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'http://rubygems.org' gemspec -gem 'rails', '>= 3.1.2' +gem 'rails', '>= 3.1.2' group :local do gem 'pry' diff --git a/README.md b/README.md index 6713baaa..bcb4734d 100644 --- a/README.md +++ b/README.md @@ -484,7 +484,7 @@ Note that you can disable the default migrating of all tenants with `db:migrate` Apartment supports parallelizing migrations into multiple threads when you have a large number of tenants. By default, parallel migrations is -turned off. You can enable this by setting `parallel_migration_threads` to +turned off. You can enable this by setting `parallel_migration_threads` to the number of threads you want to use in your initializer. Keep in mind that because migrations are going to access the database, diff --git a/Rakefile b/Rakefile index df67edc6..8eaec6d0 100644 --- a/Rakefile +++ b/Rakefile @@ -119,10 +119,18 @@ def activerecord_below_5_2? ActiveRecord.version.release < Gem::Version.new('5.2.0') end +def activerecord_below_6_0? + ActiveRecord.version.release < Gem::Version.new('6.0.0') +end + def migrate if activerecord_below_5_2? ActiveRecord::Migrator.migrate('spec/dummy/db/migrate') - else + elsif activerecord_below_6_0? ActiveRecord::MigrationContext.new('spec/dummy/db/migrate').migrate + else + # TODO: Figure out if there is any other possibility that can/should be + # passed here as the second argument for the migration context + ActiveRecord::MigrationContext.new('spec/dummy/db/migrate', ActiveRecord::SchemaMigration).migrate end end