2016-07-18 9 views
1

私は以前モデルが2つあったので、私はスキーマの移行を使用しようとしています。 私はdjango southのスキーマの移行

python manage.py schemamigration appname --add modelname 
python manage.py schemamigration appname 
python manage.py schemamigration 
python manage.py schemamigration appname --fake 

のようないくつかのコマンドを試してみましたが、運

は、時にはそれが

You have not passed any of --initial, --auto, --empty, --add-model, --add-field or --add-index. 

と私はジャンゴに新しいです、時々この1

sage: manage.py schemamigration [options] 

Creates a new template schema migration for the given app 

manage.py: error: ambiguous option: --add (--add-field, --add-index, --add-model?) 

私にエラーを与えませんので、いくつかの助けが必要です。

+0

それを得ません。 Djangoを移行して焼いてみてください。このプロセスは、1)移行を行い、その後2)実際に適用します。コマンドは次のとおりです:1)python manage.py makemigrations 2)python manage.py migrate – DataSwede

答えて

0

は、最後にあなたがジャンゴの新しいバージョンを使用している場合は、南はもはやスキーマの移行のために必要とされる

python manage.py schemamigration appname --auto 
関連する問題