mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #31685 -- Added support for updating conflicts to QuerySet.bulk_create().
Thanks Florian Apolloner, Chris Jerdonek, Hannes Ljungberg, Nick Pope, and Mariusz Felisiak for reviews.
This commit is contained in:
committed by
Mariusz Felisiak
parent
ba9de2e74e
commit
0f6946495a
@@ -232,6 +232,10 @@ Models
|
||||
in order to reduce the number of failed requests, e.g. after database server
|
||||
restart.
|
||||
|
||||
* :meth:`.QuerySet.bulk_create` now supports updating fields when a row
|
||||
insertion fails uniqueness constraints. This is supported on MariaDB, MySQL,
|
||||
PostgreSQL, and SQLite 3.24+.
|
||||
|
||||
Requests and Responses
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -298,6 +302,14 @@ backends.
|
||||
* ``DatabaseIntrospection.get_key_columns()`` is removed. Use
|
||||
``DatabaseIntrospection.get_relations()`` instead.
|
||||
|
||||
* ``DatabaseOperations.ignore_conflicts_suffix_sql()`` method is replaced by
|
||||
``DatabaseOperations.on_conflict_suffix_sql()`` that accepts the ``fields``,
|
||||
``on_conflict``, ``update_fields``, and ``unique_fields`` arguments.
|
||||
|
||||
* The ``ignore_conflicts`` argument of the
|
||||
``DatabaseOperations.insert_statement()`` method is replaced by
|
||||
``on_conflict`` that accepts ``django.db.models.constants.OnConflict``.
|
||||
|
||||
Dropped support for MariaDB 10.2
|
||||
--------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user