1
0
mirror of https://github.com/django/django.git synced 2024-12-26 02:56:25 +00:00

Use DEFAULT_DB_ALIAS

This commit is contained in:
Andrew Godwin 2013-08-12 16:40:41 +01:00
parent b61b634628
commit 841b7af812

View File

@ -4,7 +4,7 @@ from optparse import make_option
from django.core.management.base import BaseCommand from django.core.management.base import BaseCommand
from django.core.exceptions import ImproperlyConfigured 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.loader import MigrationLoader
from django.db.migrations.autodetector import MigrationAutodetector, InteractiveMigrationQuestioner from django.db.migrations.autodetector import MigrationAutodetector, InteractiveMigrationQuestioner
from django.db.migrations.state import ProjectState 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 # Load the current graph state. Takes a connection, but it's not used
# (makemigrations doesn't look at the database state). # (makemigrations doesn't look at the database state).
loader = MigrationLoader(connections["default"]) loader = MigrationLoader(connections[DEFAULT_DB_ALIAS])
# Detect changes # Detect changes
autodetector = MigrationAutodetector( autodetector = MigrationAutodetector(