mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Refs #11964 -- Made constraint support check respect required_db_features.
This will notably silence the warnings issued when running the test suite on MySQL.
This commit is contained in:
committed by
Mariusz Felisiak
parent
2fb872e56f
commit
8b3e1b6e9e
@@ -1813,7 +1813,10 @@ class Model(metaclass=ModelBase):
|
||||
if not router.allow_migrate_model(db, cls):
|
||||
continue
|
||||
connection = connections[db]
|
||||
if connection.features.supports_table_check_constraints:
|
||||
if (
|
||||
connection.features.supports_table_check_constraints or
|
||||
'supports_table_check_constraints' in cls._meta.required_db_features
|
||||
):
|
||||
continue
|
||||
if any(isinstance(constraint, CheckConstraint) for constraint in cls._meta.constraints):
|
||||
errors.append(
|
||||
|
||||
Reference in New Issue
Block a user