diff options
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 168 |
1 files changed, 166 insertions, 2 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 14a6c3c9f7..95cdc6bc3f 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,164 @@ +* Allow `slice` to take an array of methods (without need for splatting). + + *Cohen Carlisle* + +* Improved partial writes with HABTM and has many through associations + to fire database query only if relation has been changed. + + Fixes #19663. + + *Mehmet Emin İNAÇ* + +* Deprecate passing arguments and block at the same time to + `ActiveRecord::QueryMethods#select`. + + *Prathamesh Sonpatki* + +* Optimistic locking: Added ability update locking_column value. + Ignore optimistic locking if update with new locking_column value. + + *bogdanvlviv* + +* Fixed: Optimistic locking does not work well with null in the database. + + Fixes #26024 + + *bogdanvlviv* + +* Fixed support for case insensitive comparisons of `text` columns in + PostgreSQL. + + *Edho Arief* + +* Serialize JSON attribute value `nil` as SQL `NULL`, not JSON `null` + + *Trung Duc Tran* + +* Return `true` from `update_attribute` when the value of the attribute + to be updated is unchanged. + + Fixes #26593. + + *Prathamesh Sonpatki* + +* Always store errors details information with symbols. + + When the association is autosaved we were storing the details with + string keys. This was creating inconsistency with other details that are + added using the `Errors#add` method. It was also inconsistent with the + `Errors#messages` storage. + + To fix this inconsistency we are always storing with symbols. This will + cause a small breaking change because in those cases the details could + be accessed as strings keys but now it can not. + + Fix #26499. + + *Rafael Mendonça França*, *Marcus Vieira* + +* Calling `touch` on a model using optimistic locking will now leave the model + in a non-dirty state with no attribute changes. + + Fixes #26496. + + *Jakob Skjerning* + +* Using a mysql2 connection after it fails to reconnect will now have an error message + saying the connection is closed rather than an undefined method error message. + + *Dylan Thacker-Smith* + +* PostgreSQL array columns will now respect the encoding of strings contained + in the array. + + Fixes #26326. + + *Sean Griffin* + +* Inverse association instances will now be set before `after_find` or + `after_initialize` callbacks are run. + + Fixes #26320. + + *Sean Griffin* + +* Remove unnecessarily association load when a `belongs_to` association has already been + loaded then the foreign key is changed directly and the record saved. + + *James Coleman* + +* Remove standardized column types/arguments spaces in schema dump. + + *Tim Petricola* + +* Avoid loading records from database when they are already loaded using + the `pluck` method on a collection. + + Fixes #25921. + + *Ryuta Kamizono* + +* Remove text default treated as an empty string in non-strict mode for + consistency with other types. + + Strict mode controls how MySQL handles invalid or missing values in + data-change statements such as INSERT or UPDATE. If strict mode is not + in effect, MySQL inserts adjusted values for invalid or missing values + and produces warnings. + + def test_mysql_not_null_defaults_non_strict + using_strict(false) do + with_mysql_not_null_table do |klass| + record = klass.new + assert_nil record.non_null_integer + assert_nil record.non_null_string + assert_nil record.non_null_text + assert_nil record.non_null_blob + + record.save! + record.reload + + assert_equal 0, record.non_null_integer + assert_equal "", record.non_null_string + assert_equal "", record.non_null_text + assert_equal "", record.non_null_blob + end + end + end + + https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-strict + + *Ryuta Kamizono* + +* Sqlite3 migrations to add a column to an existing table can now be + successfully rolled back when the column was given and invalid column + type. + + Fixes #26087 + + *Travis O'Neill* + +* Deprecate `sanitize_conditions`. Use `sanitize_sql` instead. + + *Ryuta Kamizono* + +* Doing count on relations that contain LEFT OUTER JOIN Arel node no longer + force a DISTINCT. This solves issues when using count after a left_joins. + + *Maxime Handfield Lapointe* + +* RecordNotFound raised by association.find exposes `id`, `primary_key` and + `model` methods to be consistent with RecordNotFound raised by Record.find. + + *Michel Pigassou* + +* Hashes can once again be passed to setters of `composed_of`, if all of the + mapping methods are methods implemented on `Hash`. + + Fixes #25978. + + *Sean Griffin* + * Fix the SELECT statement in `#table_comment` for MySQL. *Takeshi Akima* @@ -40,7 +201,9 @@ *Xavier Noria* * Using `group` with an attribute that has a custom type will properly cast - the hash keys after calling a calculation method like `count`. Fixes #25595. + the hash keys after calling a calculation method like `count`. + + Fixes #25595. *Sean Griffin* @@ -74,6 +237,7 @@ *Sean Griffin* * Ensure hashes can be assigned to attributes created using `composed_of`. + Fixes #25210. *Sean Griffin* @@ -93,7 +257,7 @@ *Erol Fornoles* -* PostgreSQL: Fix db:structure:load silent failure on SQL error. +* PostgreSQL: Fix `db:structure:load` silent failure on SQL error. The command line flag `-v ON_ERROR_STOP=1` should be used when invoking `psql` to make sure errors are not suppressed. |