diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2019-11-12 19:49:09 -0800 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-11-20 20:42:38 +0100 |
commit | f5ebdfce5c417f9844e86bccc2f12577064d4bad (patch) | |
tree | 9e8228bae93ac2ebc0ec9de10baeff8c5793510b /django/db/utils.py | |
parent | 3e5b349535f011a51dc308898924786143000631 (diff) | |
download | django-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.py | 11 |
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): |