summaryrefslogtreecommitdiff
path: root/django/db/utils.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2019-11-12 19:49:09 -0800
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-11-20 20:42:38 +0100
commitf5ebdfce5c417f9844e86bccc2f12577064d4bad (patch)
tree9e8228bae93ac2ebc0ec9de10baeff8c5793510b /django/db/utils.py
parent3e5b349535f011a51dc308898924786143000631 (diff)
downloaddjango-f5ebdfce5c417f9844e86bccc2f12577064d4bad.tar.gz
Fixed #25388 -- Added an option to allow disabling of migrations during test database creation.
Diffstat (limited to 'django/db/utils.py')
-rw-r--r--django/db/utils.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/django/db/utils.py b/django/db/utils.py
index 4bd119227f..28afa6cd07 100644
--- a/django/db/utils.py
+++ b/django/db/utils.py
@@ -194,8 +194,15 @@ class ConnectionHandler:
raise ConnectionDoesNotExist("The connection %s doesn't exist" % alias)
test_settings = conn.setdefault('TEST', {})
- for key in ['CHARSET', 'COLLATION', 'NAME', 'MIRROR']:
- test_settings.setdefault(key, None)
+ default_test_settings = [
+ ('CHARSET', None),
+ ('COLLATION', None),
+ ('MIGRATE', True),
+ ('MIRROR', None),
+ ('NAME', None),
+ ]
+ for key, value in default_test_settings:
+ test_settings.setdefault(key, value)
def __getitem__(self, alias):
if hasattr(self._connections, alias):