- edited description
max_length ignored in django 1.7 migrations
After updating to autoslug version 1.8.0, django made new migrations for all auto slug fields. Which is fine, but none of the migrations contained the custom max_length
parameters I had set. Instead, I get migrations like this:
migrations.AlterField(
model_name='collection item'
name='slug',
field=autoslug.fields.AutoSlugField(populate_from=b'title', unique=True, editable=False),
preserve_default=True,
),
I had set the max_length
to 60, not the default 50.
Just to test for sure, I changed the max_length
again, and tried to make migrations. Django said there were no changes detected.
So it seems that no matter what you set max_length
to, it always ignores it, and creates a column with the default length of 50.
Comments (5)
-
reporter -
Added a PR to address this: https://bitbucket.org/neithere/django-autoslug/pull-request/16/fixes-issue-25-do-not-remove-non-default/diff
-
repo owner Thank you Mike. I've merged your PR, it will be released soon as 1.8.1 or 1.9. The link to the PR is now broken because I have migrated django-autoslug to Git. The old repo (with PRs) is still visible as https://bitbucket.org/neithere/django-autoslug-old_hg.
-
repo owner - changed status to resolved
-
Thank you for dealing with this! When do you plan ro release 1.8.1?
- Log in to comment