Closed Hellowlonewolf closed 5 years ago
I am facing same issue. How did you resolved this?
Same issue here, any updates ?
Try this at the top of django settings.py from django.db.backends.mysql.base import DatabaseWrapper DatabaseWrapper.data_types['DateTimeField'] = 'datetime' # fix for MySQL 5.5
Same issue here, any updates ?
from django.db.backends.mysql.base import DatabaseWrapper DatabaseWrapper.data_types['DateTimeField'] = 'datetime' # fix for MySQL 5.5
@rishabh7683 Essas linhas funcionaram muito bem aqui, obrigado. Pra mim ficou assim:
Versão do Python 3.8.3 64 bits
mysqlclient==2.0.3
settings:
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'Nome_Banco',
'USER': 'root',
'PASSWORD': 'senha',
'HOST': 'endereço_ip',
'PORT': '3306',
}
from django.db.backends.mysql.base import DatabaseWrapper
DatabaseWrapper.data_types['DateTimeField'] = 'datetime' # fix for MySQL 5.5
[root@localhost FasterRunner-master]# python3 manage.py migrate System check identified some issues:
WARNINGS: ?: (mysql.W002) MySQL Strict Mode is not set for database connection 'default' HINT: MySQL's Strict Mode fixes many data integrity problems in MySQL, such as data truncation upon insertion, by escalating warnings into errors. It is strongly recommended you activate it. See: https://docs.djangoproject.com/en/2.1/ref/databases/#mysql-sql-mode Operations to perform: Apply all migrations: admin, auth, contenttypes, djcelery, fastrunner, fastuser, sessions Running migrations: _mysql_exceptions.ProgrammingError: (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 above exception was the direct cause of the following exception:
django.db.utils.ProgrammingError: (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")
During handling of the above exception, another exception occurred:
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")) `