1
0
mirror of https://github.com/django/django.git synced 2025-07-19 17:19:12 +00:00

[1.9.x] Fixed #26096, refs #25196 -- Fixed incorrect argument order in test database creation.

Backport of abcdb237bb313d116ce2ac8e90f79f61429afc70 from master
This commit is contained in:
Tim Graham 2015-11-13 11:28:20 -05:00
parent 0911c35678
commit f0da306af1
3 changed files with 6 additions and 3 deletions

View File

@ -31,7 +31,7 @@ class DatabaseCreation(BaseDatabaseCreation):
try: try:
if verbosity >= 1: if verbosity >= 1:
print("Destroying old test database for alias %s..." % ( print("Destroying old test database for alias %s..." % (
self._get_database_display_str(target_database_name, verbosity), self._get_database_display_str(verbosity, target_database_name),
)) ))
cursor.execute("DROP DATABASE %s" % qn(target_database_name)) cursor.execute("DROP DATABASE %s" % qn(target_database_name))
cursor.execute("CREATE DATABASE %s" % qn(target_database_name)) cursor.execute("CREATE DATABASE %s" % qn(target_database_name))

View File

@ -33,7 +33,7 @@ class DatabaseCreation(BaseDatabaseCreation):
try: try:
if verbosity >= 1: if verbosity >= 1:
print("Destroying old test database for alias %s..." % ( print("Destroying old test database for alias %s..." % (
self._get_database_display_str(target_database_name, verbosity), self._get_database_display_str(verbosity, target_database_name),
)) ))
cursor.execute("DROP DATABASE %s" % qn(target_database_name)) cursor.execute("DROP DATABASE %s" % qn(target_database_name))
cursor.execute("CREATE DATABASE %s WITH TEMPLATE %s" % ( cursor.execute("CREATE DATABASE %s WITH TEMPLATE %s" % (

View File

@ -34,4 +34,7 @@ Bugfixes
* Fixed a regression where defining a relation on an abstract model's field * Fixed a regression where defining a relation on an abstract model's field
using a string model name without an app_label no longer resolved that using a string model name without an app_label no longer resolved that
reference to the abstract model's app if using that model in another reference to the abstract model's app if using that model in another
application (:ticket:`25858`). application (:ticket:`25858`).
* Fixed a crash when destroying an existing test database on MySQL or
PostgreSQL (:ticket:`26096`).