Fixed the django.contrib.gis test database creation as well.
Refs r10026 and r10027. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10028 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
6c6edb9d04
commit
0543f33bbc
|
@ -140,7 +140,10 @@ def create_spatial_db(test=False, verbosity=1, autoclobber=False, interactive=Fa
|
|||
# Closing the connection
|
||||
connection.close()
|
||||
settings.DATABASE_NAME = db_name
|
||||
settings.DATABASE_SUPPORTS_TRANSACTIONS = connection.creation._rollback_works()
|
||||
connection.settings_dict["DATABASE_NAME"] = db_name
|
||||
can_rollback = connection.creation._rollback_works()
|
||||
settings.DATABASE_SUPPORTS_TRANSACTIONS = can_rollback
|
||||
connection.settings_dict["DATABASE_SUPPORTS_TRANSACTIONS"] = can_rollback
|
||||
|
||||
# Syncing the database
|
||||
call_command('syncdb', verbosity=verbosity, interactive=interactive)
|
||||
|
|
|
@ -322,8 +322,9 @@ class BaseDatabaseCreation(object):
|
|||
self.connection.close()
|
||||
settings.DATABASE_NAME = test_database_name
|
||||
self.connection.settings_dict["DATABASE_NAME"] = test_database_name
|
||||
settings.DATABASE_SUPPORTS_TRANSACTIONS = self._rollback_works()
|
||||
self.connection.settings_dict["DATABASE_SUPPORTS_TRANSACTIONS"] = self._rollback_works()
|
||||
can_rollback = self._rollback_works()
|
||||
settings.DATABASE_SUPPORTS_TRANSACTIONS = can_rollback
|
||||
self.connection.settings_dict["DATABASE_SUPPORTS_TRANSACTIONS"] = can_rollback
|
||||
|
||||
call_command('syncdb', verbosity=verbosity, interactive=False)
|
||||
|
||||
|
|
Loading…
Reference in New Issue