Closed
Description
Migrated issue, originally created by MartinH (@dwt)
I just found out that MariaDB since version 10.2 supports check constraints
https://mariadb.com/kb/en/library/mariadb-1021-release-notes/
https://mariadb.com/kb/en/constraint/
yet when I try to drop one via alembic, I get this error
File "/Users/dwt/.virtualenvs/yeepa/lib/python2.7/site-packages/alembic/ddl/mysql.py", line 340, in _mysql_drop_constraint
"No generic 'DROP CONSTRAINT' in MySQL - "
NotImplementedError: No generic 'DROP CONSTRAINT' in MySQL - please specify constraint type
if I don't specify the constraint type 'check'. But if I do, I get this
File "/Users/dwt/.virtualenvs/yeepa/lib/python2.7/site-packages/alembic/ddl/mysql.py", line 337, in _mysql_drop_constraint
"MySQL does not support CHECK constraints.")
NotImplementedError: MySQL does not support CHECK constraints.
This is on alembic (0.9.7) - which I believe is the latest released version.
Is there kind of a flag I can set to work around this? Of course I also have production databases which don't yet support this flag...