max_length ignored in django 1.7 migrations

Issue #25 resolved
Jared Proffitt created an issue

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)

  1. Log in to comment