Skip to content

Commit dbd3ce6

Browse files
Merge pull request rails#35883 from alexcameron89/add_ar_release_notes
[ci-skip] Add 6.0 Release Notes for Active Record
2 parents bf1494a + 4416158 commit dbd3ce6

File tree

1 file changed

+227
-0
lines changed

1 file changed

+227
-0
lines changed

guides/source/6_0_release_notes.md

Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,237 @@ Please refer to the [Changelog][active-record] for detailed changes.
211211

212212
### Removals
213213

214+
* Remove deprecated `#set_state` from the transaction object.
215+
([Commit](https://github.com/rails/rails/commit/6c745b0c5152a4437163a67707e02f4464493983))
216+
217+
* Remove deprecated `#supports_statement_cache?` from the database adapters.
218+
([Commit](https://github.com/rails/rails/commit/5f3ed8784383fb4eb0f9959f31a9c28a991b7553))
219+
220+
* Remove deprecated `#insert_fixtures` from the database adapters.
221+
([Commit](https://github.com/rails/rails/commit/400ba786e1d154448235f5f90183e48a1043eece))
222+
223+
* Remove deprecated `ActiveRecord::ConnectionAdapters::SQLite3Adapter#valid_alter_table_type?`.
224+
([Commit](https://github.com/rails/rails/commit/45b4d5f81f0c0ca72c18d0dea4a3a7b2ecc589bf))
225+
226+
* Remove support for passing the column name to `sum` when a block is passed.
227+
([Commit](https://github.com/rails/rails/commit/91ddb30083430622188d76eb9f29b78131df67f9))
228+
229+
* Remove support for passing the column name to `count` when a block is passed.
230+
([Commit](https://github.com/rails/rails/commit/67356f2034ab41305af7218f7c8b2fee2d614129))
231+
232+
* Remove support for delegation of missing methods in a relation to arel.
233+
([Commit](https://github.com/rails/rails/commit/d97980a16d76ad190042b4d8578109714e9c53d0))
234+
235+
* Remove support for delegating missing methods in a relation to private methods of the class.
236+
([Commit](https://github.com/rails/rails/commit/a7becf147afc85c354e5cfa519911a948d25fc4d))
237+
238+
* Remove support for specifying a timestamp name for `#cache_key`.
239+
([Commit](https://github.com/rails/rails/commit/0bef23e630f62e38f20b5ae1d1d5dbfb087050ea))
240+
241+
* Remove deprecated `ActiveRecord::Migrator.migrations_path=`.
242+
([Commit](https://github.com/rails/rails/commit/90d7842186591cae364fab3320b524e4d31a7d7d))
243+
244+
* Remove deprecated `expand_hash_conditions_for_aggregates`.
245+
([Commit](https://github.com/rails/rails/commit/27b252d6a85e300c7236d034d55ec8e44f57a83e))
246+
247+
214248
### Deprecations
215249

250+
* Deprecate mismatched case-sensitivity collation comparisons for uniqueness validator.
251+
([Commit](https://github.com/rails/rails/commit/9def05385f1cfa41924bb93daa187615e88c95b9))
252+
253+
* Deprecate using class level querying methods if the receiver scope has leaked.
254+
([Pull Request](https://github.com/rails/rails/pull/35280))
255+
256+
* Deprecate `config.activerecord.sqlite3.represent_boolean_as_integer`.
257+
([Commit](https://github.com/rails/rails/commit/f59b08119bc0c01a00561d38279b124abc82561b))
258+
259+
* Deprecate passing `migrations_paths` to `connection.assume_migrated_upto_version`.
260+
([Commit](https://github.com/rails/rails/commit/c1b14aded27e063ead32fa911aa53163d7cfc21a))
261+
262+
* Deprecate `ActiveRecord::Result#to_hash` in favor of `ActiveRecord::Result#to_a`.
263+
([Commit](https://github.com/rails/rails/commit/16510d609c601aa7d466809f3073ec3313e08937))
264+
265+
* Deprecate methods in `DatabaseLimits`: `column_name_length`, `table_name_length`,
266+
`columns_per_table`, `indexes_per_table`, `columns_per_multicolumn_index`,
267+
`sql_query_length`, and `joins_per_query`.
268+
([Commit](https://github.com/rails/rails/commit/e0a1235f7df0fa193c7e299a5adee88db246b44f))
269+
270+
* Deprecate `update_attributes`/`!` in favor of `update`/`!`.
271+
([Commit](https://github.com/rails/rails/commit/5645149d3a27054450bd1130ff5715504638a5f5))
272+
216273
### Notable changes
217274

275+
* Bump the minimum sqlite3 version to 1.4.
276+
([Pull Request](https://github.com/rails/rails/pull/35844))
277+
278+
* Add `rails db:prepare` to create a database if it doesn't exist, and run its migrations.
279+
([Pull Request](https://github.com/rails/rails/pull/35768))
280+
281+
* Add `after_save_commit` callback as shortcut for `after_commit :hook, on: [ :create, :update ]`.
282+
([Pull Request](https://github.com/rails/rails/pull/35804))
283+
284+
* Add `ActiveRecord::Relation#extract_associated` for extracting associated records from a relation.
285+
([Pull Request](https://github.com/rails/rails/pull/35784))
286+
287+
* Add `ActiveRecord::Relation#annotate` for adding SQL comments to ActiveRecord::Relation queries.
288+
([Pull Request](https://github.com/rails/rails/pull/35617))
289+
290+
* Add support for setting Optimizer Hints on databases.
291+
([Pull Request](https://github.com/rails/rails/pull/35615))
292+
293+
* Add `insert_all`/`insert_all!`/`upsert_all` methods for doing bulk inserts.
294+
([Pull Request](https://github.com/rails/rails/pull/35631))
295+
296+
* Add `rails db:seed:replant` that truncates tables of each database
297+
for ther current environment and loads the seeds.
298+
([Pull Request](https://github.com/rails/rails/pull/34779))
299+
300+
* Add `reselect` method, which is a short-hand for `unscope(:select).select(fields)`.
301+
([Pull Request](https://github.com/rails/rails/pull/33611))
302+
303+
* Add negative scopes for all enum values.
304+
([Pull Request](https://github.com/rails/rails/pull/35381))
305+
306+
* Add `#destroy_by` and `#delete_by` for conditional removals.
307+
([Pull Request](https://github.com/rails/rails/pull/35316))
308+
309+
* Add the ability to automatically switch database connections.
310+
([Pull Request](https://github.com/rails/rails/pull/35073))
311+
312+
* Add the ability to prevent writes to a database for the duration of a block.
313+
([Pull Request](https://github.com/rails/rails/pull/34505))
314+
315+
* Add an API for switching connections to support multiple databases.
316+
([Pull Request](https://github.com/rails/rails/pull/34052))
317+
318+
* Make timestamps with precision the default for migrations.
319+
([Pull Request](https://github.com/rails/rails/pull/34970))
320+
321+
* Support `:size` option to change text and blob size in MySQL.
322+
([Pull Request](https://github.com/rails/rails/pull/35071))
323+
324+
* Set both the foreign key and the foreign type columns to NULL for
325+
polymorphic associations on `dependent: :nullify` strategy.
326+
([Pull Request](https://github.com/rails/rails/pull/28078))
327+
328+
* Allow a permitted instance of `ActionController::Parameters` to be passed as an
329+
argument to `ActiveRecord::Relation#exists?`.
330+
([Pull Request](https://github.com/rails/rails/pull/34891))
331+
332+
* Add support in `#where` for endless ranges introduced in Ruby 2.6.
333+
([Pull Request](https://github.com/rails/rails/pull/34906))
334+
335+
* Make `ROW_FORMAT=DYNAMIC` a default create table option for MySQL.
336+
([Pull Request](https://github.com/rails/rails/pull/34742))
337+
338+
* Add the ability to disable scopes generated by `ActiveRecord.enum`.
339+
([Pull Request](https://github.com/rails/rails/pull/34605/files))
340+
341+
* Make implicit ordering configurable for a column.
342+
([Pull Request](https://github.com/rails/rails/pull/34480))
343+
344+
* Bump the minimum PostgreSQL version to 9.3, dropping support for 9.1 and 9.2.
345+
([Pull Request](https://github.com/rails/rails/pull/34520))
346+
347+
* Make the values of an enum frozen, raising an error when attempting to modify them.
348+
([Pull Request](https://github.com/rails/rails/pull/34517))
349+
350+
* Make the SQL of `ActiveRecord::StatementInvalid` errors its own error property
351+
and include SQL binds as a separate error property.
352+
([Pull Request](https://github.com/rails/rails/pull/34468))
353+
354+
* Add an `:if_not_exists` option to `create_table`.
355+
([Pull Request](https://github.com/rails/rails/pull/31382))
356+
357+
* Add support for multiple databases to `rails db:schema:cache:dump`
358+
and `rails db:schema:cache:clear`.
359+
([Pull Request](https://github.com/rails/rails/pull/34181))
360+
361+
* Add support for hash and url configs in database hash of `ActiveRecord::Base.connected_to`.
362+
([Pull Request](https://github.com/rails/rails/pull/34196))
363+
364+
* Add support for default expressions and expression indexes for MySQL.
365+
([Pull Request](https://github.com/rails/rails/pull/34307))
366+
367+
* Add an `index` option for `change_table` migration helpers.
368+
([Pull Request](https://github.com/rails/rails/pull/23593))
369+
370+
* Fix `transaction` reverting for migrations. Previously, commands inside of a `transaction`
371+
in a reverted migration ran uninverted. This change fixes that.
372+
([Pull Request](https://github.com/rails/rails/pull/31604))
373+
374+
* Allow `ActiveRecord::Base.configurations=` to be set with a symbolized hash.
375+
([Pull Request](https://github.com/rails/rails/pull/33968))
376+
377+
* Fix the counter cache to only update if the record is actually saved.
378+
([Pull Request](https://github.com/rails/rails/pull/33913))
379+
380+
* Add expression indexes support for the SQLite adapter.
381+
([Pull Request](https://github.com/rails/rails/pull/33874))
382+
383+
* Allow subclasses to redefine autosave callbacks for associated records.
384+
([Pull Request](https://github.com/rails/rails/pull/33378))
385+
386+
* Bump the minimum MySQL version to 5.5.8.
387+
([Pull Request](https://github.com/rails/rails/pull/33853))
388+
389+
* Use the utf8mb4 character set by default in MySQL.
390+
([Pull Request](https://github.com/rails/rails/pull/33608))
391+
392+
* Add the ability to filter out sensitive data in `#inspect`
393+
([Pull Request](https://github.com/rails/rails/pull/33756), [Pull Request](https://github.com/rails/rails/pull/34208))
394+
395+
* Change `ActiveRecord::Base.configurations` to return an object instead of a hash.
396+
([Pull Request](https://github.com/rails/rails/pull/33637))
397+
398+
* Add database configuration to disable advisory locks.
399+
([Pull Request](https://github.com/rails/rails/pull/33691))
400+
401+
* Update SQLite3 adapter `alter_table` method to restore foreign keys.
402+
([Pull Request](https://github.com/rails/rails/pull/33585))
403+
404+
* Allow the `:to_table` option of `remove_foreign_key` to be invertible.
405+
([Pull Request](https://github.com/rails/rails/pull/33530))
406+
407+
* Fix default value for mysql time types with specified precision.
408+
([Pull Request](https://github.com/rails/rails/pull/33280))
409+
410+
* Fix the `touch` option to behave consistently with `Persistence#touch` method.
411+
([Pull Request](https://github.com/rails/rails/pull/33107))
412+
413+
* Raise an exception for duplicate column definitions in Migrations.
414+
([Pull Request](https://github.com/rails/rails/pull/33029))
415+
416+
* Bump the minimum SQLite version to 3.8.
417+
([Pull Request](https://github.com/rails/rails/pull/32923))
418+
419+
* Fix parent records to not get saved with duplicate children records.
420+
([Pull Request](https://github.com/rails/rails/pull/32952))
421+
422+
* Ensure `Associations::CollectionAssociation#size` and `Associations::CollectionAssociation#empty?`
423+
use loaded association ids if present.
424+
([Pull Request](https://github.com/rails/rails/pull/32617))
425+
426+
* Add support to preload associations of polymorphic associations when not all the records have the requested associations.
427+
([Commit](https://github.com/rails/rails/commit/75ef18c67c29b1b51314b6c8a963cee53394080b))
428+
429+
* Add `touch_all` method to `ActiveRecord::Relation`.
430+
([Pull Request](https://github.com/rails/rails/pull/31513))
431+
432+
* Add `ActiveRecord::Base.base_class?` predicate.
433+
([Pull Request](https://github.com/rails/rails/pull/32417))
434+
435+
* Add custom prefix/suffix options to `ActiveRecord::Store.store_accessor`.
436+
([Pull Request](https://github.com/rails/rails/pull/32306))
437+
438+
* Add `ActiveRecord::Base.create_or_find_by`/`!` to deal with the SELECT/INSERT race condition in
439+
`ActiveRecord::Base.find_or_create_by`/`!` by leaning on unique constraints in the database.
440+
([Pull Request](https://github.com/rails/rails/pull/31989))
441+
442+
* Add `Relation#pick` as short-hand for single-value plucks.
443+
([Pull Request](https://github.com/rails/rails/pull/31941))
444+
218445
Active Storage
219446
--------------
220447

0 commit comments

Comments
 (0)