1
0
mirror of https://github.com/django/django.git synced 2025-03-29 02:30:48 +00:00

[3.1.x] Fixed -- Doc'd caveat about using bulk_create()'s ignore_conflicts on MariDB and MySQL.

Backport of 69e0d9c553bb55dde8d7d1d479a78bfa7093f406 from master
This commit is contained in:
Tobias Krönke 2020-06-12 14:54:23 +02:00 committed by Mariusz Felisiak
parent 450df4a45a
commit 5ba2dfb9d0

@ -2108,6 +2108,17 @@ that fail constraints such as duplicate unique values. Enabling this parameter
disables setting the primary key on each model instance (if the database disables setting the primary key on each model instance (if the database
normally supports it). normally supports it).
.. warning::
On MySQL and MariaDB, setting the ``ignore_conflicts`` parameter to
``True`` turns certain types of errors, other than duplicate key, into
warnings. Even with Strict Mode. For example: invalid values or
non-nullable violations. See the `MySQL documentation`_ and
`MariaDB documentation`_ for more details.
.. _MySQL documentation: https://dev.mysql.com/doc/refman/en/sql-mode.html#ignore-strict-comparison
.. _MariaDB documentation: https://mariadb.com/kb/en/ignore/
Returns ``objs`` as cast to a list, in the same order as provided. Returns ``objs`` as cast to a list, in the same order as provided.
.. versionchanged:: 3.1 .. versionchanged:: 3.1