Fix bug, when ':dependent => :destroy' option violates foreign key constraints, issue #12380
Detect in-place modifications on Strings
Add AR::Base#validate! method

Acts same as valid? but raises AR::RecordInvalid exception
if validation fails
Add always_permitted_parameters as an option.

* This commit adds back the always_permitted_parameters
  configuration option to strong paramaters.
* The initial pull requests where this feature was added
  are the following:
  - https://github.com/rails/rails/pull/12682
  - https://github.com/rails/strong_parameters/pull/174
Simplify complex code in databases.rake
db:fixtures:{identify,load} tasks respect AR::Tasks::DatabaseTasks.root

Before this commit, if `ENV['FIXTURES_PATH']` was set, then `Rails.root`
was used, otherwise the app used `ActiveRecord::Tasks::DatabaseTasks.root`.

Now it is consistent.
Get rid of duplication in db:fixtures:{identify,load}
Replace a bit of cryptic code in fixtures:load rake task with plain stupid Ruby
Extract `fixture_files` variable in fixtures:load rake task
db:fixtures:load refactoring: remove unnecessary loop

`ActiveRecord::FixtureSet.create_fixtures` can accept an array of
fixture_files.
Replace String index juggling with Pathname goodness in db:fixtures:load
Add explaining variables to db:migrate:status
Use Array#flat_map and Array#grep in db:migrate:status task

It allows the code to be more declarative and elegant.
db:migrate:status refactoring: Rewrite hand-crafted SQL query with ActiveRecord#pluck
Add a test for db:migrate:status to check missing file scenario
Extract AR::SchemaMigration.normalized_versions method
Use AR::SchemaMigration.table_exists? call instead of longish AR::Base...etc,etc
Stop using instance exec for type decorators

We are moving this behavior out to an object that we would like to keep
separated from `ActiveRecord::Base`, which means not passing the class
object to it. As such, we need to stop using `instance_exec`, and
instead close over the subclass on global type decorators that are
applied in `Base`.
Merge pull request #15938 from sgrif/sg-stop-instance-execing

Stop using instance exec for type decorators
Merge pull request #15940 from DNNX/databases-rake-refactoring

databases.rake refactoring