httprunner / FasterRunner

FasterRunner that depends FasterWeb
MIT License
111 stars 62 forks source link

python3 manage.py migrate .Send error please help me #48

Closed Hellowlonewolf closed 5 years ago

Hellowlonewolf commented 5 years ago

[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")) `

anuragrana commented 5 years ago

I am facing same issue. How did you resolved this?

SweetDonuts commented 4 years ago

Same issue here, any updates ?

rishabh7683 commented 4 years ago

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

rishabh7683 commented 4 years ago

Same issue here, any updates ?

from django.db.backends.mysql.base import DatabaseWrapper DatabaseWrapper.data_types['DateTimeField'] = 'datetime' # fix for MySQL 5.5

tiagolch commented 3 years ago

@rishabh7683 Essas linhas funcionaram muito bem aqui, obrigado. Pra mim ficou assim:

'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