-
Fix
touchoption to behave consistently withPersistence#touchmethod.Ryuta Kamizono
-
Back port Rails 5.2
reverse_orderArel SQL literal fix.Matt Jones, Brooke Kuhlmann
-
becomesshould clear the mutation tracker which is created inafter_initialize.Fixes #32867.
Ryuta Kamizono
- No changes.
- No changes.
-
MySQL: Support mysql2 0.5.x.
Aaron Stone
-
Apply time column precision on assignment.
PR #20317 changed the behavior of datetime columns so that when they have a specified precision then on assignment the value is rounded to that precision. This behavior is now applied to time columns as well.
Fixes #30301.
Andrew White
-
Normalize time column values for SQLite database.
For legacy reasons, time columns in SQLite are stored as full datetimes because until #24542 the quoting for time columns didn't remove the date component. To ensure that values are consistent we now normalize the date component to 2001-01-01 on reading and writing.
Andrew White
-
Ensure that the date component is removed when quoting times.
PR #24542 altered the quoting for time columns so that the date component was removed however it only removed it when it was 2001-01-01. Now the date component is removed irrespective of what the date is.
Andrew White
-
Fix that after commit callbacks on update does not triggered when optimistic locking is enabled.
Ryuta Kamizono
-
ActiveRecord::Persistence#touchdoes not work well when optimistic locking enabled andlocking_column, without default value, is null in the database.bogdanvlviv
-
Fix destroying existing object does not work well when optimistic locking enabled and
locking columnis null in the database.bogdanvlviv
-
PostgreSQL: Allow pg-1.0 gem to be used with Active Record.
Lars Kanis
-
Fix
count(:all)with eager loading and having an order other than the driving table.Fixes #31783.
Ryuta Kamizono
-
Use
count(:all)inHasManyAssociation#count_recordsto prevent invalid SQL queries for association counting.Klas Eskilson
-
Fix to invoke callbacks when using
update_attribute.Mike Busch
-
Fix
count(:all)to correctly workdistinctwith custom SELECT list.Ryuta Kamizono
-
Fix conflicts
counter_cachewithtouch: trueby optimistic locking.# create_table :posts do |t| # t.integer :comments_count, default: 0 # t.integer :lock_version # t.timestamps # end class Post < ApplicationRecord end # create_table :comments do |t| # t.belongs_to :post # end class Comment < ApplicationRecord belongs_to :post, touch: true, counter_cache: true endBefore:
post = Post.create! # => begin transaction INSERT INTO "posts" ("created_at", "updated_at", "lock_version") VALUES ("2017-12-11 21:27:11.387397", "2017-12-11 21:27:11.387397", 0) commit transaction comment = Comment.create!(post: post) # => begin transaction INSERT INTO "comments" ("post_id") VALUES (1) UPDATE "posts" SET "comments_count" = COALESCE("comments_count", 0) + 1, "lock_version" = COALESCE("lock_version", 0) + 1 WHERE "posts"."id" = 1 UPDATE "posts" SET "updated_at" = '2017-12-11 21:27:11.398330', "lock_version" = 1 WHERE "posts"."id" = 1 AND "posts"."lock_version" = 0 rollback transaction # => ActiveRecord::StaleObjectError: Attempted to touch a stale object: Post. Comment.take.destroy! # => begin transaction DELETE FROM "comments" WHERE "comments"."id" = 1 UPDATE "posts" SET "comments_count" = COALESCE("comments_count", 0) - 1, "lock_version" = COALESCE("lock_version", 0) + 1 WHERE "posts"."id" = 1 UPDATE "posts" SET "updated_at" = '2017-12-11 21:42:47.785901', "lock_version" = 1 WHERE "posts"."id" = 1 AND "posts"."lock_version" = 0 rollback transaction # => ActiveRecord::StaleObjectError: Attempted to touch a stale object: Post.After:
post = Post.create! # => begin transaction INSERT INTO "posts" ("created_at", "updated_at", "lock_version") VALUES ("2017-12-11 21:27:11.387397", "2017-12-11 21:27:11.387397", 0) commit transaction comment = Comment.create!(post: post) # => begin transaction INSERT INTO "comments" ("post_id") VALUES (1) UPDATE "posts" SET "comments_count" = COALESCE("comments_count", 0) + 1, "lock_version" = COALESCE("lock_version", 0) + 1, "updated_at" = '2017-12-11 21:37:09.802642' WHERE "posts"."id" = 1 commit transaction comment.destroy! # => begin transaction DELETE FROM "comments" WHERE "comments"."id" = 1 UPDATE "posts" SET "comments_count" = COALESCE("comments_count", 0) - 1, "lock_version" = COALESCE("lock_version", 0) + 1, "updated_at" = '2017-12-11 21:39:02.685520' WHERE "posts"."id" = 1 commit transactionFixes #31199.
bogdanvlviv
-
Query cache was unavailable when entering the
ActiveRecord::Base.cacheblock without being connected.Tsukasa Oishi
-
Fix
bin/rails db:setupandbin/rails db:test:preparecreate wrong ar_internal_metadata's data for a test database.Before:
$ RAILS_ENV=test rails dbconsole > SELECT * FROM ar_internal_metadata; key|value|created_at|updated_at environment|development|2017-09-11 23:14:10.815679|2017-09-11 23:14:10.815679After:
$ RAILS_ENV=test rails dbconsole > SELECT * FROM ar_internal_metadata; key|value|created_at|updated_at environment|test|2017-09-11 23:14:10.815679|2017-09-11 23:14:10.815679Fixes #26731.
bogdanvlviv
-
Fix longer sequence name detection for serial columns.
Fixes #28332.
Ryuta Kamizono
-
MySQL: Don't lose
auto_increment: truein thedb/schema.rb.Fixes #30894.
Ryuta Kamizono
-
Fix
COUNT(DISTINCT ...)forGROUP BYwithORDER BYandLIMIT.Fixes #30886.
Ryuta Kamizono
- No changes.
-
Ensure
sumhonorsdistinctonhas_many :throughassociationsFixes #16791
*Aaron Wortham
-
Fix
COUNT(DISTINCT ...)withORDER BYandLIMITto keep the existing select list.Ryuta Kamizono
-
Fix
unscoped(where: [columns])removing the wrong bind valuesWhen the
whereis called on a relation after aor, unscoping the column of that laterwhere, it removed bind values used by theorinstead.Post.where(id: 1).or(Post.where(id: 2)).where(foo: 3).unscope(where: :foo).to_sql # Currently: # SELECT "posts".* FROM "posts" WHERE ("posts"."id" = 2 OR "posts"."id" = 3) # With fix: # SELECT "posts".* FROM "posts" WHERE ("posts"."id" = 1 OR "posts"."id" = 2)Maxime Handfield Lapointe
-
When a
has_oneassociation is destroyed bydependent: destroy,destroyed_by_associationwill now be set to the reflection, matching the behaviour ofhas_manyassociations.Lisa Ugray
- No changes.
- No changes.
- No changes.
-
Relation#joinsis no longer affected by the target model'scurrent_scope, with the exception ofunscoped.Fixes #29338.
Sean Griffin
-
Previously, when building records using a
has_many :throughassociation, if the child records were deleted before the parent was saved, they would still be persisted. Now, if child records are deleted before the parent is saved on ahas_many :throughassociation, the child records will not be persisted.Tobias Kraze
-
Restore previous behavior of collection proxies: their values can have methods stubbed, and they respect extension modules applied by a default scope.
Ryuta Kamizono
-
Loading model schema from database is now thread-safe.
Fixes #28589.
Vikrant Chaudhary, David Abdemoulaie
-
Add type caster to
RuntimeReflection#alias_nameFixes #28959.
Jon Moss
-
Quote database name in db:create grant statement (when database_user does not have access to create the database).
Rune Philosof
-
When multiple threads are sharing a database connection inside a test using transactional fixtures, a nested transaction will temporarily lock the connection to the current thread, forcing others to wait.
Fixes #28197.
Matthew Draper
-
Load only needed records on
ActiveRecord::Relation#inspect.Instead of loading all records and returning only a subset of those, just load the records as needed.
Fixes #25537.
Hendy Tanata
-
Remove comments from structure.sql when using postgresql adapter to avoid version-specific parts of the file.
Fixes #28153.
Ari Pollak
-
Add
:defaultoption tobelongs_to.Use it to specify that an association should be initialized with a particular record before validation. For example:
# Before belongs_to :account before_validation -> { self.account ||= Current.account } # After belongs_to :account, default: -> { Current.account }George Claghorn
-
Deprecate
Migrator.schema_migrations_table_name.Ryuta Kamizono
-
Fix select with block doesn't return newly built records in has_many association.
Fixes #28348.
Ryuta Kamizono
-
Check whether
Rails.applicationdefined before calling itIn #27674 we changed the migration generator to generate migrations at the path defined in
Rails.application.config.pathshowever the code checked for the presence of theRailsconstant but not theRails.applicationmethod which caused problems when using Active Record and generators outside of the context of a Rails application.Fixes #28325.
Andrew White
-
Fix
deserializewith JSON array.Fixes #28285.
Ryuta Kamizono
-
Fix
rake db:schema:loadwith subdirectories.Ryuta Kamizono
-
Fix
rake db:migrate:statuswith subdirectories.Ryuta Kamizono
-
Don't share options between reference id and type columns
When using a polymorphic reference column in a migration, sharing options between the two columns doesn't make sense since they are different types. The
reference_idcolumn is usually an integer and thereference_typecolumn a string so options likeunsigned: truewill result in an invalid table definition.Ryuta Kamizono
-
Use
max_identifier_lengthforindex_name_lengthin PostgreSQL adapter.Ryuta Kamizono
-
Deprecate
supports_migrations?on connection adapters.Ryuta Kamizono
-
Fix regression of #1969 with SELECT aliases in HAVING clause.
Eugene Kenny
-
Deprecate using
#quoted_idin quoting.Ryuta Kamizono
-
Fix
wait_timeoutto configurable for mysql2 adapter.Fixes #26556.
Ryuta Kamizono
-
Correctly dump native timestamp types for MySQL.
The native timestamp type in MySQL is different from datetime type. Internal representation of the timestamp type is UNIX time, This means that timestamp columns are affected by time zone.
> SET time_zone = '+00:00'; Query OK, 0 rows affected (0.00 sec) > INSERT INTO time_with_zone(ts,dt) VALUES (NOW(),NOW()); Query OK, 1 row affected (0.02 sec) > SELECT * FROM time_with_zone; +---------------------+---------------------+ | ts | dt | +---------------------+---------------------+ | 2016-02-07 22:11:44 | 2016-02-07 22:11:44 | +---------------------+---------------------+ 1 row in set (0.00 sec) > SET time_zone = '-08:00'; Query OK, 0 rows affected (0.00 sec) > SELECT * FROM time_with_zone; +---------------------+---------------------+ | ts | dt | +---------------------+---------------------+ | 2016-02-07 14:11:44 | 2016-02-07 22:11:44 | +---------------------+---------------------+ 1 row in set (0.00 sec)Ryuta Kamizono
-
All integer-like PKs are autoincrement unless they have an explicit default.
Matthew Draper
-
Omit redundant
using: :btreefor schema dumping.Ryuta Kamizono
-
Deprecate passing
defaulttoindex_name_exists?.Ryuta Kamizono
-
PostgreSQL: schema dumping support for interval and OID columns.
Ryuta Kamizono
-
Deprecate
supports_primary_key?on connection adapters since it's been long unused and unsupported.Ryuta Kamizono
-
Make
table_name=reset current statement cache, so queries are not run against the previous table name.namusyaka
-
Allow
ActiveRecord::Base#as_jsonto be passed a frozen Hash.Isaac Betesh
-
Fix inspection behavior when the :id column is not primary key.
namusyaka
-
Deprecate locking records with unpersisted changes.
Marc Schütz
-
Remove deprecated behavior that halts callbacks when the return is false.
Rafael Mendonça França
-
Deprecate
ColumnDumper#migration_keys.Ryuta Kamizono
-
Fix
association_primary_key_typefor reflections with symbol primary key.Fixes #27864.
Daniel Colson
-
Virtual/generated column support for MySQL 5.7.5+ and MariaDB 5.2.0+.
MySQL generated columns: https://dev.mysql.com/doc/refman/5.7/en/create-table-generated-columns.html MariaDB virtual columns: https://mariadb.com/kb/en/mariadb/virtual-computed-columns/
Declare virtual columns with
t.virtual name, type: …, as: "expression". Passstored: trueto persist the generated value (false by default).Example:
create_table :generated_columns do |t| t.string :name t.virtual :upper_name, type: :string, as: "UPPER(name)" t.virtual :name_length, type: :integer, as: "LENGTH(name)", stored: true t.index :name_length # May be indexed, too! endRyuta Kamizono
-
Deprecate
initialize_schema_migrations_tableandinitialize_internal_metadata_table.Ryuta Kamizono
-
Support foreign key creation for SQLite3.
Ryuta Kamizono
-
Place generated migrations into the path set by
config.paths["db/migrate"].Kevin Glowacz
-
Raise
ActiveRecord::InvalidForeignKeywhen a foreign key constraint fails on SQLite3.Ryuta Kamizono
-
Add the touch option to
#increment!and#decrement!.Hiroaki Izu
-
Deprecate passing a class to the
class_namebecause it eagerloads more classes than necessary and potentially creates circular dependencies.Kir Shatrov
-
Raise error when has_many through is defined before through association.
Fixes #26834.
Chris Holmes
-
Deprecate passing
nametoindexes.Ryuta Kamizono
-
Remove deprecated tasks:
db:test:clone,db:test:clone_schema,db:test:clone_structure.Rafel Mendonça França
-
Compare deserialized values for
PostgreSQL::OID::Hstoretypes when callingActiveRecord::Dirty#changed_in_place?.Fixes #27502.
Jon Moss
-
Raise
ArgumentErrorwhen passing anActiveRecord::Baseinstance to.find,.exists?and.update.Rafael Mendonça França
-
Respect precision option for arrays of timestamps.
Fixes #27514.
Sean Griffin
-
Optimize slow model instantiation when using STI and
store_full_sti_class = falseoption.Konstantin Lazarev
-
Add
touchoption to counter cache modifying methods.Works when updating, resetting, incrementing and decrementing counters:
# Touches `updated_at`/`updated_on`. Topic.increment_counter(:messages_count, 1, touch: true) Topic.decrement_counter(:messages_count, 1, touch: true) # Touches `last_discussed_at`. Topic.reset_counters(18, :messages, touch: :last_discussed_at) # Touches `updated_at` and `last_discussed_at`. Topic.update_counters(18, messages_count: 5, touch: %i( updated_at last_discussed_at ))Fixes #26724.
Jarred Trost
-
Remove deprecated
#uniq,#uniq!, and#uniq_value.Ryuta Kamizono
-
Remove deprecated
#insert_sql,#update_sql, and#delete_sql.Ryuta Kamizono
-
Remove deprecated
#use_transactional_fixturesconfiguration.Rafael Mendonça França
-
Remove deprecated
#raise_in_transactional_callbacksconfiguration.Rafael Mendonça França
-
Remove deprecated
#load_schema_for.Rafael Mendonça França
-
Remove deprecated conditions parameter from
#destroy_alland#delete_all.Rafael Mendonça França
-
Remove deprecated support to passing arguments to
#selectwhen a block is provided.Rafael Mendonça França
-
Remove deprecated support to query using commas on LIMIT.
Rafael Mendonça França
-
Remove deprecated support to passing a class as a value in a query.
Rafael Mendonça França
-
Raise
ActiveRecord::IrreversibleOrderErrorwhen usinglastwith an irreversible order.Rafael Mendonça França
-
Raise when a
has_many :throughassociation has an ambiguous reflection name.Rafael Mendonça França
-
Raise when
ActiveRecord::Migrationis inherited from directly.Rafael Mendonça França
-
Remove deprecated
original_exceptionargument inActiveRecord::StatementInvalid#initializeandActiveRecord::StatementInvalid#original_exception.Rafael Mendonça França
-
#tablesand#table_exists?return only tables and not views.All the deprecations on those methods were removed.
Rafael Mendonça França
-
Remove deprecated
nameargument from#tables.Rafael Mendonça França
-
Remove deprecated support to passing a column to
#quote.Rafael Mendonça França
-
Set
:timeas a timezone aware type and remove deprecation whenconfig.active_record.time_zone_aware_typesis not explicitly set.Rafael Mendonça França
-
Remove deprecated force reload argument in singular and collection association readers.
Rafael Mendonça França
-
Remove deprecated
activerecord.errors.messages.restrict_dependent_destroy.oneandactiverecord.errors.messages.restrict_dependent_destroy.manyi18n scopes.Rafael Mendonça França
-
Allow passing extra flags to
db:structure:loadanddb:structure:dumpIntroduces
ActiveRecord::Tasks::DatabaseTasks.structure_(load|dump)_flagsto customize the eventual commands run against the database, e.g. mysqldump/pg_dump.Kir Shatrov
-
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
-
Support index length and order options using both string and symbol column names.
Fixes #27243.
Ryuta Kamizono
-
Raise
ActiveRecord::RangeErrorwhen values that executed are out of range.Ryuta Kamizono
-
Raise
ActiveRecord::NotNullViolationwhen 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 triggered once, similar to a SQL database trigger.
Stefan Budeanu
-
Moved
DecimalWithoutScale,Text, andUnsignedIntegerfrom Active Model to Active Record.Iain Beeston
-
Fix
write_attributemethod to check whether an attribute is aliased or not, and use the aliased attribute name if needed.Prathamesh Sonpatki
-
Fix
read_attributemethod 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
-
Change the type argument of
ActiveRecord::Base#attributeto be optional. The default is nowActiveRecord::Type::Value.new, which provides no type casting behavior.Sean Griffin
-
Don't treat unsigned integers with zerofill as signed.
Fixes #27125.
Ryuta Kamizono
-
Fix the uniqueness validation scope with a polymorphic association.
Sergey Alekseev
-
Raise
ActiveRecord::RecordNotFoundfrom collection*_idssetters for unknown IDs with a better error message.Changes the collection
*_idssetters to cast provided IDs the data type of the primary key set in the association, not the model primary key.Dominic Cleal
-
For PostgreSQL >= 9.4 use
pgcrypto'sgen_random_uuid()instead ofuuid-ossp's UUID generation function.Yuji Yaginuma, Yaw Boakye
-
Introduce
Model#reload_<association>to bring back the behavior ofArticle.category(true)wherecategoryis a singular association.The force reloading of the association reader was deprecated in #20888. Unfortunately the suggested alternative of
article.reload.categorydoes not expose the same behavior.This patch adds a reader method with the prefix
reload_for singular associations. This method has the same semantics as passing true to the association reader used to have.Yves Senn
-
Make sure eager loading
ActiveRecord::Associationsalso loads constants defined inActiveRecord::Associations::Preloader.Yves Senn
-
Allow
ActionController::Parameters-like objects to be passed as values for Postgres HStore columns.Fixes #26904.
Jon Moss
-
Added
statmethod toActiveRecord::ConnectionAdapters::ConnectionPool.Example:
ActiveRecord::Base.connection_pool.stat # => { size: 15, connections: 1, busy: 1, dead: 0, idle: 0, waiting: 0, checkout_timeout: 5 }Pavel Evstigneev
-
Avoid
unscope(:order)whenlimit_valueis presented forcountandexists?.If
limit_valueis presented, records fetching order is very important for performance. We should not unscope the order in the case.Ryuta Kamizono
-
Fix an Active Record
DateTimefieldNoMethodErrorcaused by incomplete datetime.Fixes #24195.
Sen Zhang
-
Allow
sliceto take an array of methods(without the 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
-
Fixed: Optimistic locking does not work well with
nullin the database.Fixes #26024.
bogdanvlviv
-
Fixed support for case insensitive comparisons of
textcolumns in PostgreSQL.Edho Arief
-
Serialize JSON attribute value
nilas SQLNULL, not JSONnull.Trung Duc Tran
-
Return
truefromupdate_attributewhen 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#addmethod. It was also inconsistent with theErrors#messagesstorage.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
touchon 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_findorafter_initializecallbacks are run.Fixes #26320.
Sean Griffin
-
Remove unnecessarily association load when a
belongs_toassociation 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
pluckmethod 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 endhttps://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. Usesanitize_sqlinstead.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_keyandmodelmethods 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 onHash.Fixes #25978.
Sean Griffin
-
Fix the SELECT statement in
#table_commentfor MySQL.Takeshi Akima
-
Virtual attributes will no longer raise when read on models loaded from the database.
Sean Griffin
-
Support calling the method
mergeinscope's lambda.Yasuhiro Sugino
-
Fixes multi-parameter attributes conversion with invalid params.
Hiroyuki Ishii
-
Add newline between each migration in
structure.sql.Keeps schema migration inserts as a single commit, but allows for easier git diffing.
Fixes #25504.
Grey Baker, Norberto Lopes
-
The flag
error_on_ignored_order_or_limithas been deprecated in favor of the currenterror_on_ignored_order.Xavier Noria
-
Batch processing methods support
limit:Post.limit(10_000).find_each do |post| # ... endIt also works in
find_in_batchesandin_batches.Xavier Noria
-
Using
groupwith an attribute that has a custom type will properly cast the hash keys after calling a calculation method likecount.Fixes #25595.
Sean Griffin
-
Fix the generated
#to_parammethod to useomission: ''so that the resulting output is actually up to 20 characters, not effectively 17 to leave room for the default "...". Also call#parameterizebefore#truncateand make theseparator: /-/to maximize the information included in the output.Fixes #23635.
Rob Biedenharn
-
Ensure concurrent invocations of the connection reaper cannot allocate the same connection to two threads.
Fixes #25585.
Matthew Draper
-
Inspecting an object with an associated array of over 10 elements no longer truncates the array, preventing
inspectfrom looping infinitely in some cases.Kevin McPhillips
-
Removed the unused methods
ActiveRecord::Base.connection_idandActiveRecord::Base.connection_id=.Sean Griffin
-
Ensure hashes can be assigned to attributes created using
composed_of.Fixes #25210.
Sean Griffin
-
Fix logging edge case where if an attribute was of the binary type and was provided as a Hash.
Jon Moss
-
Handle JSON deserialization correctly if the column default from database adapter returns
''instead ofnil.Johannes Opper
-
Introduce new Active Record transaction error classes for catching transaction serialization failures or deadlocks.
Erol Fornoles
-
PostgreSQL: Fix
db:structure:loadsilent failure on SQL error.The command line flag
-v ON_ERROR_STOP=1should be used when invokingpsqlto make sure errors are not suppressed.Example:
psql -v ON_ERROR_STOP=1 -q -f awesome-file.sql my-app-dbFixes #23818.
Ralin Chimev
Please check 5-0-stable for previous changes.