python-social-auth django.db.utils.OperationalError: (1071, 'Specified key was too long; max key len

为了用Facebook能登录公司网站,安装python-social-auth,但在生产环境上migrate时报如下错:

 

django.db.utils.OperationalError: (1071, 'Specified key was too long; max key length is 1000 bytes')

试了python-social-auth内的设置:

 

SOCIAL_AUTH_UID_LENGTH = 222
SOCIAL_AUTH_NONCE_SERVER_URL_LENGTH = 200
SOCIAL_AUTH_ASSOCIATION_SERVER_URL_LENGTH = 135
SOCIAL_AUTH_ASSOCIATION_HANDLE_LENGTH = 125

不管用

最后找到一个方法,过去了,有点忐忑,mysql 5.1

alter table social_auth_association  ENGINE=InnoDB;

python-social-auth Specified-key-too-lon
Views (3888) Comment (1) 2016-11-01
老楠 :
不过然并卵,在国内的服务器什么阿里云啊之类的并不能使用Facebook的接口。
For example, "name@something.com". If someone replies to you it will be via email.
For example, "http://someaddress.com"