CHANGELOG.md 2.1 KB
Newer Older
B
Brian Christian 已提交
1 2 3 4 5 6
*   Don't impose primary key order if limit() has already been supplied.

    Fixes #23607

    *Brian Christian*

7 8 9 10 11
*   Add environment & load_config dependency to `bin/rake db:seed` to enable
    seed load in environments without Rails and custom DB configuration

    *Tobias Bielohlawek*

12
*   Fix default value for mysql time types with specified precision.
13 14 15

    *Nikolay Kondratyev*

16 17 18 19
*   Fix `touch` option to behave consistently with `Persistence#touch` method.

    *Ryuta Kamizono*

20 21 22 23 24
*   Migrations raise when duplicate column definition.

    Fixes #33024.

    *Federico Martinez*
R
Ryuta Kamizono 已提交
25

26 27 28 29
*   Bump minimum SQLite version to 3.8

    *Yasuo Honda*

30
*   Fix parent record should not get saved with duplicate children records.
31

32
    Fixes #32940.
33 34 35

    *Santosh Wadghule*

36 37 38 39
*   Fix logic on disabling commit callbacks so they are not called unexpectedly when errors occur.

    *Brian Durand*

40 41 42 43 44
*   Ensure `Associations::CollectionAssociation#size` and `Associations::CollectionAssociation#empty?`
    use loaded association ids if present.

    *Graham Turner*

45 46 47 48
*   Add support to preload associations of polymorphic associations when not all the records have the requested associations.

    *Dana Sherson*

49 50 51 52 53 54 55 56
*   Add `touch_all` method to `ActiveRecord::Relation`.

    Example:

        Person.where(name: "David").touch_all(time: Time.new(2020, 5, 16, 0, 0, 0))

    *fatkodima*, *duggiefresh*

57
*   Add `ActiveRecord::Base.base_class?` predicate.
58 59 60

    *Bogdan Gusiev*

61
*   Add custom prefix/suffix options to `ActiveRecord::Store.store_accessor`.
62

63
    *Tan Huynh*, *Yukio Mizuta*
64

J
Jeremy Daer 已提交
65 66 67 68
*   Rails 6 requires Ruby 2.4.1 or newer.

    *Jeremy Daer*

69 70 71
*   Deprecate `update_attributes`/`!` in favor of `update`/`!`.

    *Eddie Lebow*
72 73 74 75 76

*   Add ActiveRecord::Base.create_or_find_by/! to deal with the SELECT/INSERT race condition in
    ActiveRecord::Base.find_or_create_by/! by leaning on unique constraints in the database.

    *DHH*
77

78 79 80 81
*   Add `Relation#pick` as short-hand for single-value plucks.

    *DHH*

82

83
Please check [5-2-stable](https://github.com/rails/rails/blob/5-2-stable/activerecord/CHANGELOG.md) for previous changes.