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:
committed by
Mariusz Felisiak
parent
7f612eda80
commit
1fc2c70f76
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user