summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2013-08-12 16:40:41 +0100
committerAndrew Godwin <andrew@aeracode.org>2013-08-12 16:40:41 +0100
commit841b7af8120e854f3aa37b8918f461efcbbef3d6 (patch)
treebba89d182d8137750b2405c2cac49a57a3061fbc
parentb61b6346284fb32614aab965bd2cb09b383fc9f5 (diff)
Use DEFAULT_DB_ALIAS
-rw-r--r--django/core/management/commands/makemigrations.py4
1 files 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(