Django perform the migration table to generate an error

Django perform the migration generated table:

python manage.py migrate

An error

django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table ('(1064, "You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near '(6) NOT NULL)' at line 1")')

the reason:

Django2.1 no longer supported MySQL5.5, you must be version 5.6 or more

Evil it is compatible with the problem! ! !

The author is Python3.8 + Django3.1 + MySQL5.5

MySQL reload it.

 

Or to downgrade to 2.0 Django

pip install Django==2.0.0 -i https://pypi.douban.com/simple

Paul missing but also other problems, after all compatible evil!

 

Guess you like

Origin www.cnblogs.com/sad-dog/p/12651577.html