newline at end of structure.sql file
Merge pull request #12486 from cjolly/newline-eof-structure-sql

newline at end of structure.sql file
push the node->AR cache up one level
remove delegate methods that are not used
unhook `join_constraints` from the @tables ivar
Dump the default function when the primary key is uuid

Fixes #12489
Push default_function to superclass to avoid method check
Extract a function to determine if the default value is a function
cleanup changelog entry format. [ci skip]
Merge pull request #11833 from vipulnsward/remove_autoincrement

Remove sqlite specific`supports_autoincrement?` which defaults to true
Merge pull request #9499 from dmitry/inverse_instance_should_not_be_reloaded_after_stale_state_change

Inversed instance should not be reloaded after stale state was changed

Conflicts:
	activerecord/CHANGELOG.md
Remove `default_primary_key_type`  and extract contains of `native_database_types` to a constant since they aren't conditional now in SQLite3Adapter. Makes it more like other adapters.
Merge pull request #12527 from vipulnsward/sqlite_database_types

SQLite3 Adapter datatypes cleanup
scope_chain should not be mutated for other reflections

Currently `scope_chain` uses same array for building different
`scope_chain` for different associations. During processing
these arrays are sometimes mutated and because of in-place
mutation the changed `scope_chain` impacts other reflections.

Fix is to dup the value before adding to the `scope_chain`.

Fixes #3882.
`$SAFE = 4;` has been removed with Ruby 2.1

For background -
https://bugs.ruby-lang.org/issues/8468
Changset - https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/41259/diff/test/ruby/test_thread.rb
Merge pull request #12530 from vipulnsward/remove_thread_safe

`$SAFE = 4;` has been removed with Ruby 2.1
Minor Refactoring to `NumberHelper#number_to_human`

* Use destructive `map` and `sort_by` to save extra object creation.
* Create `INVERTED_DECIMAL_UNITS.invert` constant instead of repeatedly doing `DECIMAL_UNITS.invert`
Fix `singleton_class?`

Due to changes from http://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/39628 current `singleton_class?` implementation fails.
Changed based on reference from http://bugs.ruby-lang.org/issues/7609
Remove size alias for length validation

Removed ```The `size` helper is an alias for `length`.``` line. If you use this "nonexist" helper, you will get an error message like this: 

```
ArgumentError: Unknown validator: 'SizeValidator'
...
```

Maybe wanted to mean ```validates_size_of``` helper as an alias for ```validates_length_of``` helper.
Merge pull request #12532 from vipulnsward/singleton_class

Fix `singleton_class?`