From 994ce87bbda7cc4b0059c951b06cdd15dc26cb97 Mon Sep 17 00:00:00 2001 From: Iain Beeston Date: Mon, 3 Oct 2016 14:06:11 +0100 Subject: Moved database-specific ActiveModel types into ActiveRecord ie. DecimalWithoutScale, Text and UnsignedInteger --- activerecord/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 15b49e0a0b..2f4b7ca231 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,7 @@ +* Moved DecimalWithoutScale, Text, and UnsignedInteger from Active Model to Active Record + + *Iain Beeston* + * Fixed support for case insensitive comparisons of `text` columns in PostgreSQL. -- cgit v1.2.3 From 3e452b12043ecfd983c6132d6eb97eb79db952b7 Mon Sep 17 00:00:00 2001 From: Pavel Pravosud Date: Tue, 10 May 2016 15:10:46 -0700 Subject: Make pg adapter use bigserial for pk by default --- activerecord/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 96d0ad3b30..2182ee78bb 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,7 @@ +* PostgreSQL & MySQL: Use big integer as primary key type for new tables + + *Jon McCartie*, *Pavel Pravosud* + * Change the type argument of `ActiveRecord::Base#attribute` to be optional. The default is now `ActiveRecord::Type::Value.new`, which provides no type casting behavior. -- cgit v1.2.3 From 9cbf54c81a46cc070f3997956c12915f39dbb46b Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Fri, 16 Sep 2016 19:21:56 +0530 Subject: Check whether the current attribute being read is aliased or not before reading - If aliased, then use the aliased attribute name. - Fixes #26417. --- activerecord/CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 2182ee78bb..8b9396936a 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,10 @@ +* Fix `read_attribute` method to check whether an attribute is aliased or not, and + use the aliased attribute name if needed. + + Fixes #26417. + + *Prathamesh Sonpatki* + * PostgreSQL & MySQL: Use big integer as primary key type for new tables *Jon McCartie*, *Pavel Pravosud* @@ -58,7 +65,7 @@ *Jon Moss* -* Added `stat` method to `ActiveRecord::ConnectionAdapters::ConnectionPool` +* Add `stat` method to `ActiveRecord::ConnectionAdapters::ConnectionPool`. Example: -- cgit v1.2.3 From 44dc4f6645e12ddd5cf927bca0675a5b44d55cbd Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Wed, 5 Oct 2016 22:04:33 +0530 Subject: Check whether the current attribute being write is aliased or not before writing - If aliased, then use the aliased attribute name. --- activerecord/CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 8b9396936a..d7c2d80f33 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,8 @@ +* Fix `write_attribute` method to check whether an attribute is aliased or not, and + use the aliased attribute name if needed. + + *Prathamesh Sonpatki* + * Fix `read_attribute` method to check whether an attribute is aliased or not, and use the aliased attribute name if needed. @@ -65,7 +70,7 @@ *Jon Moss* -* Add `stat` method to `ActiveRecord::ConnectionAdapters::ConnectionPool`. +* Added `stat` method to `ActiveRecord::ConnectionAdapters::ConnectionPool`. Example: -- cgit v1.2.3 From 371c083fb0620efebf7bd0188a66486403e12ecc Mon Sep 17 00:00:00 2001 From: Stefan Budeanu Date: Thu, 1 Dec 2016 17:39:15 -0500 Subject: Emulate db trigger behaviour for after_commit :destroy, :update Race conditions can occur when an ActiveRecord is destroyed twice or destroyed and updated. The callbacks should only be triggered once, similar to a SQL database trigger. --- activerecord/CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 8e2c039575..07176334e4 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,11 @@ +* Emulate db trigger behaviour for after_commit :destroy, :update + + Race conditions can occur when an ActiveRecord is destroyed + twice or destroyed and updated. The callbacks should only be + triggered once, similar to a SQL database trigger. + + *Stefan Budeanu* + * Moved DecimalWithoutScale, Text, and UnsignedInteger from Active Model to Active Record *Iain Beeston* -- cgit v1.2.3 From 3190aab84d4a0a667f6dbc4ff61c706058cb4e5f Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sat, 10 Dec 2016 04:41:42 +0900 Subject: Add a changelog entry for #25451 [ci skip] --- activerecord/CHANGELOG.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 07176334e4..e377ad85c9 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,4 +1,9 @@ -* Emulate db trigger behaviour for after_commit :destroy, :update +* Raise `ActiveRecord::NotNullViolation` when a record cannot be inserted + or updated because it would violate a not null constraint. + + *Ryuta Kamizono* + +* Emulate db trigger behaviour for after_commit :destroy, :update. Race conditions can occur when an ActiveRecord is destroyed twice or destroyed and updated. The callbacks should only be @@ -6,7 +11,7 @@ *Stefan Budeanu* -* Moved DecimalWithoutScale, Text, and UnsignedInteger from Active Model to Active Record +* Moved `DecimalWithoutScale`, `Text`, and `UnsignedInteger` from Active Model to Active Record. *Iain Beeston* @@ -22,7 +27,7 @@ *Prathamesh Sonpatki* -* PostgreSQL & MySQL: Use big integer as primary key type for new tables +* PostgreSQL & MySQL: Use big integer as primary key type for new tables. *Jon McCartie*, *Pavel Pravosud* @@ -42,7 +47,7 @@ *Sergey Alekseev* -* Raise ActiveRecord::RecordNotFound from collection `*_ids` setters +* Raise `ActiveRecord::RecordNotFound` from collection `*_ids` setters for unknown IDs with a better error message. Changes the collection `*_ids` setters to cast provided IDs the data @@ -129,7 +134,7 @@ * Fixed: Optimistic locking does not work well with `null` in the database. - Fixes #26024 + Fixes #26024. *bogdanvlviv* @@ -138,7 +143,7 @@ *Edho Arief* -* Serialize JSON attribute value `nil` as SQL `NULL`, not JSON `null` +* Serialize JSON attribute value `nil` as SQL `NULL`, not JSON `null`. *Trung Duc Tran* @@ -242,7 +247,7 @@ successfully rolled back when the column was given and invalid column type. - Fixes #26087 + Fixes #26087. *Travis O'Neill* @@ -272,7 +277,7 @@ *Takeshi Akima* * Virtual attributes will no longer raise when read on models loaded from the - database + database. *Sean Griffin* -- cgit v1.2.3 From 7bce826adefadfa43335eb0f19f8f1746596da97 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sat, 10 Dec 2016 23:07:45 +0900 Subject: Add a changelog entry for #25227 [ci skip] --- activerecord/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index e377ad85c9..7401e8b26c 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,7 @@ +* Raise `ActiveRecord::RangeError` when values that executed are out of range. + + *Ryuta Kamizono* + * Raise `ActiveRecord::NotNullViolation` when a record cannot be inserted or updated because it would violate a not null constraint. -- cgit v1.2.3 From 9cdf38ff3443ac6de750518c40f696ddece8c288 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 11 Dec 2016 20:55:23 +0900 Subject: Add a changelog entry for #26687 [ci skip] --- activerecord/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 7401e8b26c..6e2ece80f9 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,10 @@ +* Support index length and order options using both string and symbol + column names. + + Fixes #27243. + + *Ryuta Kamizono* + * Raise `ActiveRecord::RangeError` when values that executed are out of range. *Ryuta Kamizono* -- cgit v1.2.3 From 34a1c7e284e9d307f61070dfb30f0d6ab34c74d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Tue, 13 Dec 2016 12:01:02 -0500 Subject: Add CHANGELOG entry to #27042 [ci skip] --- activerecord/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 6e2ece80f9..4b74527144 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,7 @@ +* Change the schema cache format to use YAML instead of Marshal. + + *Kir Shatrov* + * Support index length and order options using both string and symbol column names. -- cgit v1.2.3 From e220fda3e5a497f4b971cf1bb59b2020059634bf Mon Sep 17 00:00:00 2001 From: Richard Monette Date: Mon, 12 Dec 2016 16:51:39 -0500 Subject: fix QueryCache nil dup make sql statements frozen dup if arel is not our string expect runtime error dont wrap runtime error in invalid log errors will now be treated as runtime errors update changelog --- activerecord/CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 4b74527144..eac54e7566 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,13 @@ +* Notifications see frozen SQL string. + + Fixes #23774 + + *Richard Monette* + +* RuntimeErrors are no longer translated to ActiveRecord::StatementInvalid. + + *Richard Monette* + * Change the schema cache format to use YAML instead of Marshal. *Kir Shatrov* -- cgit v1.2.3 From 0017866341e6ee085987173b0b586e8b7e8fee65 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Tue, 27 Dec 2016 08:47:10 -0500 Subject: Small edits to activerecord/CHANGELOG.md [ci skip] - add period where necessary - add backticks where necessary --- activerecord/CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index eac54e7566..034e45b769 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,10 +1,10 @@ * Notifications see frozen SQL string. - Fixes #23774 + Fixes #23774. *Richard Monette* -* RuntimeErrors are no longer translated to ActiveRecord::StatementInvalid. +* RuntimeErrors are no longer translated to `ActiveRecord::StatementInvalid`. *Richard Monette* -- cgit v1.2.3