1
0
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:
Tim Graham
2016-08-01 07:57:12 -04:00
parent 39387efbba
commit ddcf7dbae7
2 changed files with 19 additions and 2 deletions

View File

@@ -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