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

Adds apps file to specifcy auto field #38

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

ollz272
Copy link
Contributor

@ollz272 ollz272 commented Jul 25, 2022

We're getting a problem locally. In our project we have:
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

Which, because this app doesn't specify its auto field (as it has no apps.py file), it makes a migration:

(shiftingpower) Olivers-MacBook-Pro:shiftingpower oli$ ./manage.py makemigrations
Migrations for 'wagtail_footnotes':
  /Users/oli/.virtualenvs/shiftingpower/lib/python3.10/site-packages/wagtail_footnotes/migrations/0003_alter_footnote_id.py
    - Alter field id on footnote 
# Generated by Django 3.2.14 on 2022-07-25 13:48

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('wagtail_footnotes', '0002_alter_footnote_unique_together'),
    ]

    operations = [
        migrations.AlterField(
            model_name='footnote',
            name='id',
            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
        ),
    ]

Adding this file stops this migration getting made

@nickmoreton nickmoreton mentioned this pull request Oct 17, 2022
5 tasks
Copy link
Contributor

@nickmoreton nickmoreton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in hand in: #46

Copy link
Contributor

@nickmoreton nickmoreton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ollz272 I will merge this in.

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

Successfully merging this pull request may close these issues.

2 participants