I have this model in my Django project:
class Institution(models.Model):
name = models.CharField(unique=True, max_length=100, blank=True)
description = models.TextField(max_length=500, null=True, blank=True)
def __str__(self):
return self.name
I run my project completely when I use SQLite
,but when I change my database engine to Mysql
I got this error:
MySQLdb._exceptions.OperationalError: (1170, "BLOB/TEXT column 'name' used in key specification without a key length")
What I must to do?