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

Auto-generated migration after clean install (Django 2.1) #267

Open
gabn88 opened this issue Jan 30, 2019 · 5 comments
Open

Auto-generated migration after clean install (Django 2.1) #267

gabn88 opened this issue Jan 30, 2019 · 5 comments

Comments

@gabn88
Copy link
Contributor

gabn88 commented Jan 30, 2019

On commit 30c3ec3 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.

@dokterbob
Copy link
Collaborator

dokterbob commented Jan 30, 2019 via email

@gabn88
Copy link
Contributor Author

gabn88 commented Jan 31, 2019

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

@dokterbob
Copy link
Collaborator

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 dokterbob changed the title When I install master I get the a new migration Auto-generated migration after clean install (Django 2.1) Feb 1, 2019
@newearthmartin
Copy link
Contributor

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

@gabn88
Copy link
Contributor Author

gabn88 commented Nov 22, 2019

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'),
        ),
    ]

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