summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorc-bata <contact@c-bata.link>2020-03-27 01:51:30 +0900
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-04-02 12:57:53 +0200
commit89032876f427a77ab4de26493190280377567d1c (patch)
tree3147821f3d0f6b17bda837eeab3cc8fb84b91304 /docs
parent75520e1767abb167633b1936d7171169d6300911 (diff)
Fixed #31275 -- Optimized sql_flush() without resetting sequences on MySQL.
Co-Authored-By: Simon Charette <charettes@users.noreply.github.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/3.1.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/releases/3.1.txt b/docs/releases/3.1.txt
index 492622d3bd..70241b1809 100644
--- a/docs/releases/3.1.txt
+++ b/docs/releases/3.1.txt
@@ -347,6 +347,10 @@ Models
* :meth:`.QuerySet.bulk_create` now sets the primary key on objects when using
MariaDB 10.5+.
+* The ``DatabaseOperations.sql_flush()`` method now generates more efficient
+ SQL on MySQL by using ``DELETE`` instead of ``TRUNCATE`` statements for
+ tables which don't require resetting sequences.
+
Pagination
~~~~~~~~~~
@@ -415,6 +419,12 @@ Tests
* :class:`~django.test.runner.DiscoverRunner` now skips running the system
checks on databases not :ref:`referenced by tests<testing-multi-db>`.
+* :class:`~django.test.TransactionTestCase` teardown is now faster on MySQL
+ due to :djadmin:`flush` command improvements. As a side effect the latter
+ doesn't automatically reset sequences on teardown anymore. Enable
+ :attr:`.TransactionTestCase.reset_sequences` if your tests require this
+ feature.
+
URLs
~~~~