1
0
mirror of https://github.com/django/django.git synced 2025-10-31 01:25:32 +00:00

Fixed #34217 -- Fixed migration crash when removing check constraints on MySQL < 8.0.16.

This commit is contained in:
DevilsAutumn
2022-12-25 21:33:02 +05:30
committed by Mariusz Felisiak
parent bbeeb45161
commit 68ef274bc5
2 changed files with 10 additions and 3 deletions

View File

@@ -1651,6 +1651,8 @@ class BaseDatabaseSchemaEditor:
)
def _delete_check_sql(self, model, name):
if not self.connection.features.supports_table_check_constraints:
return None
return self._delete_constraint_sql(self.sql_delete_check, model, name)
def _delete_constraint_sql(self, template, model, name):