Enum mappings are now exposed via class methods instead of constants.

Example:

    class Conversation < ActiveRecord::Base
      enum status: [ :active, :archived ]
    end

Before:

    Conversation::STATUS # => { "active" => 0, "archived" => 1 }

After:

    Conversation.statuses # => { "active" => 0, "archived" => 1 }
Don't try to get the subclass if the inheritance column doesn't exist

The `subclass_from_attrs` method is called even if the column specified by
the `inheritance_column` setting doesn't exist. This prevents setting associations
via the attributes hash if the association name clashes with the value of the setting,
typically `:type`. This worked previously in Rails 3.2.
Merge pull request #13710 from ujjwalt/hotfix/sti

Active Record's subclass_from_attributes shouldn't assume :type is for STI unless there is a type column.
sqlite >= 3.8.0 supports partial indexes
Merge pull request #13350 from ccutrer/sqlite-partial-indexes

sqlite >= 3.8.0 supports partial indexes
don't establish a new connection when testing with `sqlite3_mem`.

This fixes broken `rake test_sqlite3_mem` suite for Active Record.
The problem is that that the old database with the schema is lost
when establishing a new connection. Upon reconnting we are left
with a blank database and tests down the line start failing.
"string" isn't a valid column type for ActiveRecord

Conflicts:
	activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
Updated comment to mention the enum mapping class method [ci skip]
directly create the ARel AST

rather than allocating a new Relation, just make the AST directly
rm dup code

https://github.com/rails/rails/blob/e64a83cdbd3ce836f3339c600c1006b20c23d8fd/activerecord/test/cases/relation/merging_test.rb#L80-91