Skip to content

Instantly share code, notes, and snippets.

@DamianZaremba
Last active March 9, 2018 14:50
Show Gist options
  • Save DamianZaremba/e6d65a200f7c451db80939e7e9e4f2c8 to your computer and use it in GitHub Desktop.
Save DamianZaremba/e6d65a200f7c451db80939e7e9e4f2c8 to your computer and use it in GitHub Desktop.
Django social auth fix for Specified key was too long; max key length is 767 bytes
# Shrink specific columns down, so the key combination for the constraints
# aren't larger than the max legnth, when not using innodb_large_prefix.
# Length may require tweaking depending on application requirements
SOCIAL_AUTH_UID_LENGTH = 190
SOCIAL_AUTH_NONCE_SERVER_URL_LENGTH = 190
SOCIAL_AUTH_ASSOCIATION_SERVER_URL_LENGTH = 190
SOCIAL_AUTH_ASSOCIATION_HANDLE_LENGTH = 190
SOCIAL_AUTH_EMAIL_LENGTH = 190
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment