我在一个应用程序中有两个已更改的模型,但我只想为一个模型创建迁移,而忽略另一个模型,这是否可以使用 的变体来实现
./manage.py schemamigration app --auto
命令?
最佳答案
创建迁移的方法有很多种。但我只会定义两种方式。
//migrate the changes of all models of the app
./manage.py schemamigration app --auto
//migrate only the changes of the given model or 1 model
python manage.py schemamigration app_name extend_modelname --auto
关于python - 南 : how to ignore a changed model while creating a migration for an app,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15216215/