1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #30593 -- Added support for check constraints on MariaDB 10.2+.

This commit is contained in:
Hasan Ramezani
2019-07-14 01:24:35 +02:00
committed by Mariusz Felisiak
parent 7f612eda80
commit 1fc2c70f76
8 changed files with 66 additions and 7 deletions

View File

@@ -1556,7 +1556,7 @@ class SchemaTests(TransactionTestCase):
# Ensure the m2m table is still there.
self.assertEqual(len(self.column_classes(LocalM2M)), 1)
@skipUnlessDBFeature('supports_column_check_constraints')
@skipUnlessDBFeature('supports_column_check_constraints', 'can_introspect_check_constraints')
def test_check_constraints(self):
"""
Tests creating/deleting CHECK constraints
@@ -1586,7 +1586,7 @@ class SchemaTests(TransactionTestCase):
if not any(details['columns'] == ['height'] and details['check'] for details in constraints.values()):
self.fail("No check constraint for height found")
@skipUnlessDBFeature('supports_column_check_constraints')
@skipUnlessDBFeature('supports_column_check_constraints', 'can_introspect_check_constraints')
def test_remove_field_check_does_not_remove_meta_constraints(self):
with connection.schema_editor() as editor:
editor.create_model(Author)