aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md90
1 files changed, 78 insertions, 12 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 9819b85205..e14a9a972c 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,7 +1,62 @@
-## Rails 5.0.0.beta1 (December 18, 2015) ##
+* Add expression support on the schema default.
+
+ Example:
+
+ create_table :posts do |t|
+ t.datetime :published_at, default: -> { 'NOW()' }
+ end
+
+ *Ryuta Kamizono*
+
+* Fix regression when loading fixture files with symbol keys.
+
+ Fixes #22584.
+
+ *Yves Senn*
+
+* Use `version` column as primary key for schema_migrations table because
+ `schema_migrations` versions are guaranteed to be unique.
+
+ This makes it possible to use `update_attributes` on models that do
+ not have a primary key.
+
+ *Richard Schneeman*
+
+* Add short-hand methods for text and blob types in MySQL.
+
+ In Pg and Sqlite3, `:text` and `:binary` have variable unlimited length.
+ But in MySQL, these have limited length for each types (ref #21591, #21619).
+ This change adds short-hand methods for each text and blob types.
+
+ Example:
+
+ create_table :foos do |t|
+ t.tinyblob :tiny_blob
+ t.mediumblob :medium_blob
+ t.longblob :long_blob
+ t.tinytext :tiny_text
+ t.mediumtext :medium_text
+ t.longtext :long_text
+ end
+
+ *Ryuta Kamizono*
+
+* Take into account UTC offset when assigning string representation of
+ timestamp with offset specified to attribute of time type.
+
+ *Andrey Novikov*
-* No changes.
+* When calling `first` with a `limit` argument, return directly from the
+ `loaded?` records if available.
+
+ *Ben Woosley*
+
+* Deprecate sending the `offset` argument to `find_nth`. Please use the
+ `offset` method on relation instead.
+
+ *Ben Woosley*
+## Rails 5.0.0.beta1 (December 18, 2015) ##
* Order the result of `find(ids)` to match the passed array, if the relation
has no explicit order defined.
@@ -46,6 +101,14 @@
defaults without breaking existing migrations, or forcing them to be
rewritten through a deprecation cycle.
+ New migrations specify the Rails version they were written for:
+
+ class AddStatusToOrders < ActiveRecord::Migration[5.0]
+ def change
+ # ...
+ end
+ end
+
*Matthew Draper*, *Ravil Bayramgalin*
* Use bind params for `limit` and `offset`. This will generate significantly
@@ -53,7 +116,7 @@
change, passing a string containing a comma to `limit` has been deprecated,
and passing an Arel node to `limit` is no longer supported.
- Fixes #22250
+ Fixes #22250.
*Sean Griffin*
@@ -315,7 +378,7 @@
* Don't cache arguments in `#find_by` if they are an `ActiveRecord::Relation`.
- Fixes #20817
+ Fixes #20817.
*Hiroaki Izu*
@@ -444,9 +507,9 @@
* Ensure `select` quotes aliased attributes, even when using `from`.
- Fixes #21488
+ Fixes #21488.
- *Sean Griffin & @johanlunds*
+ *Sean Griffin*, *@johanlunds*
* MySQL: support `unsigned` numeric data types.
@@ -772,7 +835,7 @@
* Include the `Enumerable` module in `ActiveRecord::Relation`
- *Sean Griffin & bogdan*
+ *Sean Griffin*, *bogdan*
* Use `Enumerable#sum` in `ActiveRecord::Relation` if a block is given.
@@ -808,7 +871,7 @@
Fixes #20515.
- *Sean Griffin & jmondo*
+ *Sean Griffin*, *jmondo*
* Deprecate the PostgreSQL `:point` type in favor of a new one which will return
`Point` objects instead of an `Array`
@@ -1198,13 +1261,16 @@
*Sean Griffin*
* `scoping` no longer pollutes the current scope of sibling classes when using
- STI. e.x.
+ STI.
+
+ Fixes #18806.
+
+ Example:
StiOne.none.scoping do
StiTwo.all
end
- Fixes #18806.
*Sean Griffin*
@@ -1245,7 +1311,7 @@
* Use `SCHEMA` instead of `DB_STRUCTURE` for specifying a structure file.
- This makes the db:structure tasks consistent with test:load_structure.
+ This makes the `db:structure` tasks consistent with `test:load_structure`.
*Dieter Komendera*
@@ -1281,7 +1347,7 @@
Fixes #17621.
- *Eileen M. Uchitelle, Aaron Patterson*
+ *Eileen M. Uchitelle*, *Aaron Patterson*
* Fix n+1 query problem when eager loading nil associations (fixes #18312)