BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/305133
Change subject: Add connection options for MySQL backend ...................................................................... Add connection options for MySQL backend Add a collection of django.db.backends.mysql specific configuration options when that engine is used. The settings used are taken from the blog post https://blog.ionelmc.ro/2014/12/28/terrible-choices-mysql/ by Ionel Cristian Mărieș. Change-Id: I3fa8fd5a8091b255289f84024c0bf1e3334b267c --- M striker/settings.py 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/striker refs/changes/33/305133/1 diff --git a/striker/settings.py b/striker/settings.py index 4f702df..5996a98 100644 --- a/striker/settings.py +++ b/striker/settings.py @@ -169,6 +169,17 @@ DATABASE_ROUTERS = [ 'ldapdb.router.Router', ] +if DATABASES['default']['ENGINE'] == 'django.db.backends.mysql': + # Make Django and MySQL play nice + # https://blog.ionelmc.ro/2014/12/28/terrible-choices-mysql/ + DATABASES['default']['OPTIONS'] = { + 'sql_mode': 'TRADITIONAL', + 'charset': 'utf8', + 'init_command': + 'SET character_set_connection=utf8,' + 'collation_connection=utf8_bin,' + 'SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED', + } CACHES = { 'default': { -- To view, visit https://gerrit.wikimedia.org/r/305133 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3fa8fd5a8091b255289f84024c0bf1e3334b267c Gerrit-PatchSet: 1 Gerrit-Project: labs/striker Gerrit-Branch: master Gerrit-Owner: BryanDavis <bda...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits