* stage: Unreviewed => Accepted
Comment:
Thanks for the report. Agreed, removing a check constraint should be no-op
when not supported, the following diff fix it for me:
{{{#!diff
diff --git a/django/db/backends/base/schema.py
b/django/db/backends/base/schema.py
index fe31967ce2..8e6c21647e 100644
--- a/django/db/backends/base/schema.py
+++ b/django/db/backends/base/schema.py
@@ -1667,6 +1667,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):
}}}
Would you like to prepare a patch? (a regression test in
`migrations.test_operations.OperationTests` is required.)
--
Ticket URL: <https://code.djangoproject.com/ticket/34217#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.