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

@@ -237,7 +237,10 @@ class IntrospectionTests(TransactionTestCase):
'article_email_pub_date_uniq',
'email_pub_date_idx',
}
if connection.features.supports_column_check_constraints:
if (
connection.features.supports_column_check_constraints and
connection.features.can_introspect_check_constraints
):
custom_constraints.add('up_votes_gte_0_check')
assertDetails(constraints['up_votes_gte_0_check'], ['up_votes'], check=True)
assertDetails(constraints['article_email_pub_date_uniq'], ['article_id', 'email', 'pub_date'], unique=True)