-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
Extraneous migrations are generated when settings.DEFAULT_AUTO_FIELD is set to BigAutoField #224
Comments
Is there a work-around for this? Is it possible to put the missing migration into my project? |
Not really, no. it needs to be fixed in this repo. |
Hi @knyghty Can you provide me with more info? Especially what the content of the migration file being generated is. We already have the |
Hi @valberg, The problem, as I understand it (which is somewhat, but not fully), is that there is currently the initial migration that uses Because this is generated from the implicit from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("invitations", "0003_auto_20151126_1523"),
]
operations = [
migrations.AlterField(
model_name="invitation",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
] |
Ah, I now see that this has already been done, just not released, so sorry for the noise here. A release would be appreciated, though, if someone has the time to prep it. |
Related to these changes: https://docs.djangoproject.com/en/4.2/releases/3.2/#customizing-type-of-auto-created-primary-keys
This makes it difficult for example to have a CI step to check for missing migrations, as this package is always generating a migration file.
This can be fixed by setting default_auto_field for the models in the project, and making a migration for them if necessary.
The text was updated successfully, but these errors were encountered: