I encountered this problem. When I cannot assign a unicode string to models.CharField
.
DatabaseError: (1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='")
I found this solution, but it doesn't seem to work for me. The database returns this error:
Error Code: 1025. Error on rename of './test_database/#sql-272e_1ba' to './test_database/[MY_TABLE_NAME]' (errno: 150)
Moreover, all these solutions appear to only work after the table is created, or modify the python manage.py sql APP_NAME output and manually create the tables.
Is there a way to fix this from when originally declaring the django models in the python code, so manage.py syncdb will just produce the right tables?