This is primarily only a problem with anyone using an extended character
set for their Django models which is now a matter of fact rather than an
option.  There is of course in option to disable making utf-8 databases but
it is really use and there's a lot of focus on localization.

This could be turned into a test case the first time the models are
synced.  If the databases Unicode then use this field if not use the other
one. I believe some conditional logic is doable
On Aug 2, 2013 10:53 AM, "George Dorn" <notifications@github.com> wrote:

> In tastypie/models.py:
>
> > @@ -31,7 +31,7 @@ def save(self, *args, **kwargs):
> >      from tastypie.compat import AUTH_USER_MODEL
> >      class ApiKey(models.Model):
> >          user = models.OneToOneField(AUTH_USER_MODEL, related_name='api_key')
> > -        key = models.CharField(max_length=256, blank=True, default='', db_index=True)
> > +        key = models.CharField(max_length=255, blank=True, default='', db_index=True)
>
> This needs a migration. I know keys should never be that long, but they
> could be and there could be legacy 256-character keys in the db for some
> reason.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/toastdriven/django-tastypie/pull/987/files#r5560115>
> .
>