Last active
August 16, 2019 08:03
-
-
Save skabbit/7d020028908c64c3b2599eb5e0a051b6 to your computer and use it in GitHub Desktop.
Django+MySQL settings for fixing "incompatible with sql_mode=ONLY_FULL_GROUP_BY"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.mysql', | |
... | |
'OPTIONS': { | |
'init_command': "SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment