BryanDavis has uploaded a new change for review.
https://gerrit.wikimedia.org/r/305940
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(-)
git pull ssh://gerrit.wikimedia.org:29418/labs/striker
refs/changes/40/305940/1
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: newchange
Gerrit-Change-Id: I2a10069703fb06a48d08fa9c13f28f2f64c2854d
Gerrit-PatchSet: 1
Gerrit-Project: labs/striker
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits