Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use DEFAULT_DB_ALIAS

  • Loading branch information...
commit 841b7af8120e854f3aa37b8918f461efcbbef3d6 1 parent b61b634
@andrewgodwin andrewgodwin authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/core/management/commands/makemigrations.py
View
4 django/core/management/commands/makemigrations.py
@@ -4,7 +4,7 @@
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 @@ def handle(self, *app_labels, **options):
# 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(
Please sign in to comment.
Something went wrong with that request. Please try again.