No changes detected display this reason
Code database migration steps:
Today, the database while the database of all the deleted, re-mapping database migration, but only to find the terminal gives such information.
'>>>No changes detected'
Usually such a field generally occurs in the case of models.py unsaved, then after I have checked various data, look for the various aspects of possible errors
- settings database-related information
DATABASES
as well as unregistered app - models.py file was not saved
- Database generates records to upload data files to be deleted completely under migrations
So I try to generate an empty record in the file migrations, I want to migrate the database to the app name booktest
python manage.py makemigrations --empty booktest
The following code may be used directly or, where the mobility database specified app
python manage.py makemigrations booktest
生成记录数据的代码后我就成功看到数据库了,希望对你们也能有帮助