aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md47
1 files changed, 47 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 9d80bbe51f..24a64e9deb 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,50 @@
+* Move `ActiveRecord::StatementInvalid` SQL to error property and include binds as separate error property.
+
+ `ActiveRecord::ConnectionAdapters::AbstractAdapter#translate_exception_class` now requires `binds` to be passed as the last argument.
+
+ `ActiveRecord::ConnectionAdapters::AbstractAdapter#translate_exception` now requires `message`, `sql`, and `binds` to be passed as keyword arguments.
+
+ Subclasses of `ActiveRecord::StatementInvalid` must now provide `sql:` and `binds:` arguments to `super`.
+
+ Example:
+
+ ```
+ class MySubclassedError < ActiveRecord::StatementInvalid
+ def initialize(message, sql:, binds:)
+ super(message, sql: sql, binds: binds)
+ end
+ end
+ ```
+
+ *Gannon McGibbon*
+
+* Add an `:if_not_exists` option to `create_table`.
+
+ Example:
+
+ create_table :posts, if_not_exists: true do |t|
+ t.string :title
+ end
+
+ That would execute:
+
+ CREATE TABLE IF NOT EXISTS posts (
+ ...
+ )
+
+ If the table already exists, `if_not_exists: false` (the default) raises an
+ exception whereas `if_not_exists: true` does nothing.
+
+ *fatkodima*, *Stefan Kanev*
+
+* Defining an Enum as a Hash with blank key, or as an Array with a blank value, now raises an `ArgumentError`.
+
+ *Christophe Maximin*
+
+* Adds support for multiple databases to `rails db:schema:cache:dump` and `rails db:schema:cache:clear`.
+
+ *Gannon McGibbon*
+
* `update_columns` now correctly raises `ActiveModel::MissingAttributeError`
if the attribute does not exist.