django-newsletter icon indicating copy to clipboard operation
django-newsletter copied to clipboard

Auto-generated migration after clean install (Django 2.1)

Open gabn88 opened this issue 6 years ago • 5 comments
trafficstars

On commit 30c3ec3f3bea93b22c6640aed40ee2c8040a4f46 when I run makemigrations I get a new migration (0005). This is on Django 2.1, but I don't think that will affect it.

Alter field subscriptions on submission

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('newsletter', '0004_auto_20180407_1043'),
    ]

    operations = [
        migrations.AlterField(
            model_name='submission',
            name='subscriptions',
            field=models.ManyToManyField(blank=True, db_index=True, help_text='If you select none, the system will automatically find the subscribers for you.', limit_choices_to={'subscribed': True}, to='newsletter.Subscription', verbose_name='recipients'),
        ),
    ]

Maybe this migration should be added to the package, as I don't like having 'self-generated' migrations inside a package.

gabn88 avatar Jan 30 '19 07:01 gabn88

But what is the actual change in this migration?

dokterbob avatar Jan 30 '19 18:01 dokterbob

The limit_choices_to={'subscribed': True} appears to be new, just as the db_index. At least, when I compare with the initial migration.

gabn88 avatar Jan 31 '19 06:01 gabn88

This is weird. I'd really like to be sure whether this is is a Django 2.1 thing or whether this pertains to a specific change on our side. And if so, which change. In the latter case, I will happily merge a PR with reference to this particular change.

dokterbob avatar Feb 01 '19 12:02 dokterbob

Also happening here, I recently migrated from django 1.11 to django 2.0 and it creates a new migration for newsletter.

newearthmartin avatar Feb 18 '19 14:02 newearthmartin

Happened again.

# Generated by Django 2.2.7 on 2019-11-22 21:11

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('newsletter', '0004_auto_20180407_1043'),
    ]

    operations = [
        migrations.AlterField(
            model_name='submission',
            name='subscriptions',
            field=models.ManyToManyField(blank=True, db_index=True, help_text='If you select none, the system will automatically find the subscribers for you.', limit_choices_to={'subscribed': True}, to='newsletter.Subscription', verbose_name='recipients'),
        ),
    ]

gabn88 avatar Nov 22 '19 21:11 gabn88