From 841b7af8120e854f3aa37b8918f461efcbbef3d6 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Mon, 12 Aug 2013 16:40:41 +0100 Subject: [PATCH] Use DEFAULT_DB_ALIAS --- django/core/management/commands/makemigrations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/core/management/commands/makemigrations.py b/django/core/management/commands/makemigrations.py index cd30311820..b05f37a8bb 100644 --- a/django/core/management/commands/makemigrations.py +++ b/django/core/management/commands/makemigrations.py @@ -4,7 +4,7 @@ from optparse import make_option from django.core.management.base import BaseCommand from django.core.exceptions import ImproperlyConfigured -from django.db import connections +from django.db import connections, DEFAULT_DB_ALIAS from django.db.migrations.loader import MigrationLoader from django.db.migrations.autodetector import MigrationAutodetector, InteractiveMigrationQuestioner from django.db.migrations.state import ProjectState @@ -41,7 +41,7 @@ class Command(BaseCommand): # Load the current graph state. Takes a connection, but it's not used # (makemigrations doesn't look at the database state). - loader = MigrationLoader(connections["default"]) + loader = MigrationLoader(connections[DEFAULT_DB_ALIAS]) # Detect changes autodetector = MigrationAutodetector(