Django migration data error report table exists
The error is reported as follows: (django.db.utils.InternalError:(1050,"Table 'tb_content' already exists"))
Solution:
First delete the generated files under migrations in the project directory, such as:
Then enter:
python manage.py makemigrations --fake
1
python manage.py migrate --fake
1
The specific effect is as follows:
Finally, perform the migration operation:
#Generate Migration file
python manage.py makemigrations
#Execute migration command
python manage.py migrate