2017-08-25 45 views
2

我剛剛升級到1.11.4的Django和 python manage.py migrate -l哪裏是Django的遷移上市(遷移-l)

沒有列出任何選項更多,我不能使用。爲什麼?什麼是替代?

該列表是驗證尚未遷移的好方法。


從最新的Django:

usage: manage.py migrate [-h] [--version] [-v {0,1,2,3}] [--settings SETTINGS] 
         [--pythonpath PYTHONPATH] [--traceback] [--no-color] 
         [--noinput] [--database DATABASE] [--fake] 
         [--fake-initial] [--run-syncdb] 
         [app_label] [migration_name] 

Updates database schema. Manages both apps with migrations and those without. 

positional arguments: 
    app_label    App label of an application to synchronize the state. 
    migration_name  Database state will be brought to the state after that 
         migration. Use the name "zero" to unapply all 
         migrations. 

optional arguments: 
    -h, --help   show this help message and exit 
    --version    show program's version number and exit 
    -v {0,1,2,3}, --verbosity {0,1,2,3} 
         Verbosity level; 0=minimal output, 1=normal output, 
         2=verbose output, 3=very verbose output 
    --settings SETTINGS The Python path to a settings module, e.g. 
         "myproject.settings.main". If this isn't provided, the 
         DJANGO_SETTINGS_MODULE environment variable will be 
         used. 
    --pythonpath PYTHONPATH 
         A directory to add to the Python path, e.g. 
         "/home/djangoprojects/myproject". 
    --traceback   Raise on CommandError exceptions 
    --no-color   Don't colorize the command output. 
    --noinput, --no-input 
         Tells Django to NOT prompt the user for input of any 
         kind. 
    --database DATABASE Nominates a database to synchronize. Defaults to the 
         "default" database. 
    --fake    Mark migrations as run without actually running them. 
    --fake-initial  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. 
    --run-syncdb   Creates tables for apps without migrations 

回答

3

的Django 1.8推出showmigrations命令,你可以用它來代替(details)。

migrate --list自1.8以來已棄用,並在1.10中被刪除。