We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 840d009 commit cb7fbacCopy full SHA for cb7fbac
django/db/backends/mysql/features.py
@@ -51,9 +51,15 @@ class DatabaseFeatures(BaseDatabaseFeatures):
51
@cached_property
52
def test_collations(self):
53
charset = 'utf8'
54
- if self.connection.mysql_is_mariadb and self.connection.mysql_version >= (10, 6):
55
- # utf8 is an alias for utf8mb3 in MariaDB 10.6+.
56
- charset = 'utf8mb3'
+ if (
+ self.connection.mysql_is_mariadb
+ and self.connection.mysql_version >= (10, 6)
57
+ ) or (
58
+ not self.connection.mysql_is_mariadb
59
+ and self.connection.mysql_version >= (8, 0, 30)
60
+ ):
61
+ # utf8 is an alias for utf8mb3 in MariaDB 10.6+ and MySQL 8.0.30+.
62
+ charset = "utf8mb3"
63
return {
64
'ci': f'{charset}_general_ci',
65
'non_default': f'{charset}_esperanto_ci',
0 commit comments