|
@@ -2,12 +2,10 @@
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
import time
|
|
|
-import warnings
|
|
|
from collections import OrderedDict
|
|
|
from importlib import import_module
|
|
|
|
|
|
from django.apps import apps
|
|
|
-from django.core.management import call_command
|
|
|
from django.core.management.base import BaseCommand, CommandError
|
|
|
from django.core.management.sql import (
|
|
|
emit_post_migrate_signal, emit_pre_migrate_signal,
|
|
@@ -17,7 +15,6 @@ from django.db.migrations.autodetector import MigrationAutodetector
|
|
|
from django.db.migrations.executor import MigrationExecutor
|
|
|
from django.db.migrations.loader import AmbiguityError
|
|
|
from django.db.migrations.state import ProjectState
|
|
|
-from django.utils.deprecation import RemovedInDjango110Warning
|
|
|
from django.utils.module_loading import module_has_submodule
|
|
|
|
|
|
|
|
@@ -45,8 +42,6 @@ class Command(BaseCommand):
|
|
|
help='Detect if tables already exist and fake-apply initial migrations if so. Make sure '
|
|
|
'that the current database schema matches your initial migration before using this '
|
|
|
'flag. Django will only check for an existing table name.')
|
|
|
- parser.add_argument('--list', '-l', action='store_true', dest='list', default=False,
|
|
|
- help='Show a list of all known migrations and which are applied.')
|
|
|
parser.add_argument('--run-syncdb', action='store_true', dest='run_syncdb',
|
|
|
help='Creates tables for apps without migrations.')
|
|
|
|
|
@@ -65,24 +60,6 @@ class Command(BaseCommand):
|
|
|
db = options.get('database')
|
|
|
connection = connections[db]
|
|
|
|
|
|
- # If they asked for a migration listing, quit main execution flow and show it
|
|
|
- if options.get("list", False):
|
|
|
- warnings.warn(
|
|
|
- "The 'migrate --list' command is deprecated. Use 'showmigrations' instead.",
|
|
|
- RemovedInDjango110Warning, stacklevel=2)
|
|
|
- self.stdout.ending = None # Remove when #21429 is fixed
|
|
|
- return call_command(
|
|
|
- 'showmigrations',
|
|
|
- '--list',
|
|
|
- app_labels=[options['app_label']] if options['app_label'] else None,
|
|
|
- database=db,
|
|
|
- no_color=options.get('no_color'),
|
|
|
- settings=options.get('settings'),
|
|
|
- stdout=self.stdout,
|
|
|
- traceback=options.get('traceback'),
|
|
|
- verbosity=self.verbosity,
|
|
|
- )
|
|
|
-
|
|
|
# Hook for backends needing any database preparation
|
|
|
connection.prepare_database()
|
|
|
# Work out which apps have migrations and which do not
|