Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

max_length is not defined in migration #8

Open
fabiocaccamo opened this issue Apr 12, 2016 · 3 comments
Open

max_length is not defined in migration #8

fabiocaccamo opened this issue Apr 12, 2016 · 3 comments

Comments

@fabiocaccamo
Copy link
Contributor

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.

@justinmayer
Copy link
Owner

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?

@fabiocaccamo
Copy link
Contributor Author

fabiocaccamo commented Feb 4, 2019

@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.

@lggwettmann
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants