mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[1.10.x] Fixed #26930 -- Prevented makemigrations from accessing an empty database.
Thanks Liz Lemon for the report and investigation and
Claude Paroz for the test.
Backport of aad46c3e37 from master
This commit is contained in:
@@ -95,7 +95,9 @@ class Command(BaseCommand):
|
||||
|
||||
# Raise an error if any migrations are applied before their dependencies.
|
||||
for db in connections:
|
||||
loader.check_consistent_history(connections[db])
|
||||
connection = connections[db]
|
||||
if connection.settings_dict['ENGINE'] != 'django.db.backends.dummy':
|
||||
loader.check_consistent_history(connection)
|
||||
|
||||
# Before anything else, see if there's conflicting apps and drop out
|
||||
# hard if there are any and they don't want to merge
|
||||
|
||||
Reference in New Issue
Block a user