Fix the release task
Preparing for 4.0.6.rc1 release
Merge pull request #15269 from arunagw/aa-fixes-8930

rake railties:install:migrations respects the order of railties

Conflicts:
	activerecord/CHANGELOG.md
	railties/lib/rails/application.rb
Revert "Merge pull request #12778 from etehtsea/rake-default-fix"

This reverts commit a263d0b368fbd074bff3ee9058d13b457eaa3116.

Conflicts:
	railties/CHANGELOG.md
Revert "Merge pull request #12778 from etehtsea/rake-default-fix"

This reverts commit a263d0b368fbd074bff3ee9058d13b457eaa3116.

Conflicts:
	railties/CHANGELOG.md
Upgrading Ruby on Rails guide is no longer WIP [ci skip]
Merge pull request #15393 from tonytonyjan/patch-2

Fix documentation
Correctly pass joins when creating a JoinDependency.

Backport of #14834 to 4-0-stable
Add missing `:param` option from the docs for Mapper#match [ci skip]
Option discovered by @zackperdue in #14741, implemented in #5581.
Merge pull request #15396 from al2o3cr/issue14834-backport-4-0

Correctly pass joins when creating a JoinDependency.
[ci skip] Document Rails' shifted semver.

Conflicts:
	guides/source/maintenance_policy.md
Merge pull request #11896 from nkondratyev/fix_pg_columns_for_distinct

Fixed #columns_for_distinct of postgresql adapter

Conflicts:
	activerecord/CHANGELOG.md

Conflicts:
	activerecord/CHANGELOG.md
Change the version schema to reflect how deprecations are handled

[ci skip]

We only introduce new deprecations at Minor releases.
Merge pull request #15493 from bf4/relax_mail_dep

Relax mail gem constraint from ~> 2.5.4 to ~> 2.5
For our build, stick with mail 2.5.x for now

2.6 currently has many warnings, which are failing the Travis build.

Conflicts:
	Gemfile
`bin/rake db:migrate:status` works with legacy migration numbers.

The migration numbers were normalized different ways. This left
the task output in an inconsistent state.

Closes #15538.

Conflicts:
	activerecord/CHANGELOG.md
Skip individual tests upon Dalli::RingError

Unlike the outer `rescue`, this one is much more precise about what we
want to handle: a connection failure (`Dalli::RingError`) is not
relevant to what we're testing here. But other Dalli errors may well be
indicating an actual problem.
`ActiveRecord::SchemaMigration` has no primary key.

Before this patch, using `ActiveRecord::Base.primary_key_prefix_type`
with `:table_name_with_underscore` would change the `SchemaMigration` model
to have a primary key. This resulted in broken queries for PG because it tried
to return the inserted PK (which does not exist).

Closes #15051.
Closes #15419.

Conflicts:
	activerecord/lib/active_record/schema_migration.rb
 Mail 2.6.1 silences excessive warnings; remove Gemfile hack

Completes https://github.com/rails/rails/pull/15493

Revert "For our build, stick with mail 2.5.x for now"

This reverts commit bea0d10222567d2c930f2a5005d32354b70ac415.
Merge pull request #15575 from bf4/4-0-stable

Mail 2.6.1 silences excessive warnings; remove Gemfile hack