Синтаксическая ошибка в Django Mysql Migration, запущенной на Mac
Исключение:
~/devel/project/project$ poetry run python manage.py migrate
Operations to perform:
Apply all migrations: account, admin, alerts, auth, business, chat, contact, contenttypes, critique, curriculum, django_cron, djstripe, gear, guardian, hosted_media, jobs, news, newsletter, promo, registration, robots, seminars, sessions, sites, socialaccount, taggit, thumbnail, users
Running migrations:
Applying djstripe.0008_auto_20150806_1641_squashed_0031_auto_20170606_1708...Traceback (most recent call last):
File "/Users/martincho/Library/Caches/pypoetry/virtualenvs/project-FB7eKST1-py3.9/lib/python3.9/site-packages/django/db/backends/utils.py", line 82, in _execute
return self.cursor.execute(sql)
File "/Users/martincho/Library/Caches/pypoetry/virtualenvs/project-FB7eKST1-py3.9/lib/python3.9/site-packages/django/db/backends/mysql/base.py", line 71, in execute
return self.cursor.execute(query, args)
File "/Users/martincho/Library/Caches/pypoetry/virtualenvs/project-FB7eKST1-py3.9/lib/python3.9/site-packages/MySQLdb/cursors.py", line 206, in execute
res = self._query(query)
File "/Users/martincho/Library/Caches/pypoetry/virtualenvs/project-FB7eKST1-py3.9/lib/python3.9/site-packages/MySQLdb/cursors.py", line 319, in _query
db.query(q)
File "/Users/martincho/Library/Caches/pypoetry/virtualenvs/project-FB7eKST1-py3.9/lib/python3.9/site-packages/MySQLdb/connections.py", line 254, in query
_mysql.connection.query(self, query)
MySQLdb.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 \'"djstripe_invoice" SET "attempts" = 0 WHERE "attempts" IS NULL\' at line 1')
Это миграция djstripe, которую я не могу изменить.
Версии:
~/devel/project/project$ poetry show django
name : django
version : 2.2.28
description : A high-level Python Web framework that encourages rapid development and clean, pragmatic design.
~/devel/project/project$ poetry show dj-stripe
name : dj-stripe
version : 1.1.1
description : Django + Stripe Made Easy
~/devel/project/project$ poetry show mysqlclient
name : mysqlclient
version : 2.1.1
description : Python interface to MySQL
Версия MySQL - 5.7.
Похоже, существует конфликт с ORM и MySQL. Я не смог найти другой коннектор.