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;