From 6b05d3a2e34229bf97e0a0dad81c09fa572591ff Mon Sep 17 00:00:00 2001 From: Aric Coady Date: Wed, 29 Apr 2015 12:17:52 -0700 Subject: [PATCH] [1.8.x] Fixed #24729 -- Removed test db flush when using --keepdb. --- django/db/backends/base/creation.py | 2 +- docs/releases/1.8.1.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/django/db/backends/base/creation.py b/django/db/backends/base/creation.py index 5ae64acb14..1b05a1cb1a 100644 --- a/django/db/backends/base/creation.py +++ b/django/db/backends/base/creation.py @@ -365,7 +365,7 @@ class BaseDatabaseCreation(object): verbosity=max(verbosity - 1, 0), interactive=False, database=self.connection.alias, - test_flush=True, + test_flush=not keepdb, ) # We then serialize the current state of the database into a string diff --git a/docs/releases/1.8.1.txt b/docs/releases/1.8.1.txt index b0bcbbfeea..31e66d8c1a 100644 --- a/docs/releases/1.8.1.txt +++ b/docs/releases/1.8.1.txt @@ -75,6 +75,9 @@ Bugfixes * Fixed a migration crash when renaming the target model of a many-to-many relation (:ticket:`24725`). +* Removed flushing of the test database with :djadminopt:`--keepdb`, which + prevented apps with data migrations from using the option (:ticket:`24729`). + Optimizations =============