justinmayer / django-autoslug

AutoSlugField for Django. Supports (but not does not require) unidecode/pytils for transliteration. Old issue tracker is at Bitbucket: https://bitbucket.org/neithere/django-autoslug/issues

Home Page:https://readthedocs.org/projects/django-autoslug/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

max_length is not defined in migration

fabiocaccamo opened this issue · comments

After having added a slug field with max_length = 100 to a model and run manage.py makemigrations, if you open the migration file you can see that max_length is not defined, then the field max_length will be set to 50.

Hi Fabio. Do you believe that the issue you reported here is still relevant? If so, might you be willing to help implement a fix for it?

@justinmayer to be frankly I don't know if this bug has been fixed, if you can't test it, just leave this issue open.

It hasn't been fixed and I just ran into a Data Error "value too long for type character varying(50)" cause of it.

It would be good to have at least something in the docs about how to work around. I deleted 'max_length', created migrations, added 'max_length' again this time with the new value and created a migration. Migrate and you're good to go.