Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Use DEFAULT_DB_ALIAS

  • Loading branch information...
commit 841b7af8120e854f3aa37b8918f461efcbbef3d6 1 parent b61b634
Andrew Godwin authored August 12, 2013
4  django/core/management/commands/makemigrations.py
@@ -4,7 +4,7 @@
4 4
 
5 5
 from django.core.management.base import BaseCommand
6 6
 from django.core.exceptions import ImproperlyConfigured
7  
-from django.db import connections
  7
+from django.db import connections, DEFAULT_DB_ALIAS
8 8
 from django.db.migrations.loader import MigrationLoader
9 9
 from django.db.migrations.autodetector import MigrationAutodetector, InteractiveMigrationQuestioner
10 10
 from django.db.migrations.state import ProjectState
@@ -41,7 +41,7 @@ def handle(self, *app_labels, **options):
41 41
 
42 42
         # Load the current graph state. Takes a connection, but it's not used
43 43
         # (makemigrations doesn't look at the database state).
44  
-        loader = MigrationLoader(connections["default"])
  44
+        loader = MigrationLoader(connections[DEFAULT_DB_ALIAS])
45 45
 
46 46
         # Detect changes
47 47
         autodetector = MigrationAutodetector(

0 notes on commit 841b7af

Please sign in to comment.
Something went wrong with that request. Please try again.