mirror of
https://github.com/django/django.git
synced 2025-03-12 18:30:48 +00:00
Fixed inspectdb and schema tests on MariaDB 10.6+.
The utf8 character set (and related collations) is by default an alias for utf8mb3 on MariaDB 10.6+.
This commit is contained in:
parent
cf6774a53b
commit
355ecd1416
@ -47,11 +47,18 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
|||||||
|
|
||||||
supports_order_by_nulls_modifier = False
|
supports_order_by_nulls_modifier = False
|
||||||
order_by_nulls_first = True
|
order_by_nulls_first = True
|
||||||
test_collations = {
|
|
||||||
'ci': 'utf8_general_ci',
|
@cached_property
|
||||||
'non_default': 'utf8_esperanto_ci',
|
def test_collations(self):
|
||||||
'swedish_ci': 'utf8_swedish_ci',
|
charset = 'utf8'
|
||||||
}
|
if self.connection.mysql_is_mariadb and self.connection.mysql_version >= (10, 6):
|
||||||
|
# utf8 is an alias for utf8mb3 in MariaDB 10.6+.
|
||||||
|
charset = 'utf8mb3'
|
||||||
|
return {
|
||||||
|
'ci': f'{charset}_general_ci',
|
||||||
|
'non_default': f'{charset}_esperanto_ci',
|
||||||
|
'swedish_ci': f'{charset}_swedish_ci',
|
||||||
|
}
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def django_test_skips(self):
|
def django_test_skips(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user