jenkins-bot has submitted this change and it was merged. Change subject: Use utf8mb4 charset with MySQL backend ......................................................................
Use utf8mb4 charset with MySQL backend Bug: T142545 Change-Id: I2a10069703fb06a48d08fa9c13f28f2f64c2854d --- M striker/settings.py 1 file changed, 7 insertions(+), 3 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/striker/settings.py b/striker/settings.py index 5996a98..f68e473 100644 --- a/striker/settings.py +++ b/striker/settings.py @@ -172,12 +172,16 @@ if DATABASES['default']['ENGINE'] == 'django.db.backends.mysql': # Make Django and MySQL play nice # https://blog.ionelmc.ro/2014/12/28/terrible-choices-mysql/ + # NOTE: use of utf8mb4 charset assumes innodb_large_prefix on the hosting + # MySQL server. If not enabled, you will receive errors mentioning + # "Specified key was too long; max key length is 767 bytes" for UNIQUE + # indices on varchar(255) fields. DATABASES['default']['OPTIONS'] = { 'sql_mode': 'TRADITIONAL', - 'charset': 'utf8', + 'charset': 'utf8mb4', 'init_command': - 'SET character_set_connection=utf8,' - 'collation_connection=utf8_bin,' + 'SET character_set_connection=utf8mb4,' + 'collation_connection=utf8mb4_bin,' 'SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED', } -- To view, visit https://gerrit.wikimedia.org/r/305940 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2a10069703fb06a48d08fa9c13f28f2f64c2854d Gerrit-PatchSet: 1 Gerrit-Project: labs/striker Gerrit-Branch: master Gerrit-Owner: BryanDavis <bda...@wikimedia.org> Gerrit-Reviewer: BryanDavis <bda...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits