From 75410228dfd16e49eb3c0ea30b59b4c0d2ea6b03 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Wed, 15 Apr 2020 02:20:46 -0700 Subject: Fixed #31473 -- Made sql_flush() use RESTART IDENTITY to reset sequences on PostgreSQL. The sql_flush() positional argument sequences is replaced by the boolean keyword-only argument reset_sequences. This ensures that the old function signature can't be used by mistake when upgrading Django. When the new argument is True, the sequences of the truncated tables will reset. Using a single boolean value, rather than a list, allows making a binary yes/no choice as to whether to reset all sequences rather than a working on a completely different set. --- docs/releases/3.1.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/releases/3.1.txt b/docs/releases/3.1.txt index 55f539d534..3ec3afcf3a 100644 --- a/docs/releases/3.1.txt +++ b/docs/releases/3.1.txt @@ -519,6 +519,13 @@ backends. * ``DatabaseClient.runshell()`` now requires an additional ``parameters`` argument as a list of extra arguments to pass on to the command-line client. +* The ``sequences`` positional argument of ``DatabaseOperations.sql_flush()`` + is replaced by the boolean keyword-only argument ``reset_sequences``. If + ``True``, the sequences of the truncated tables will be reset. + +* The ``allow_cascade`` argument of ``DatabaseOperations.sql_flush()`` is now a + keyword-only argument. + Dropped support for MariaDB 10.1 -------------------------------- -- cgit v1.3