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

Changed default_auto_field to "django.db.models.BigAutoField" - Support more than 2**31 records in all models #159

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

uri-rodberg
Copy link
Contributor

AppConfig: Changed default_auto_field to "django.db.models.BigAutoField" + added migrations.

(Support more than 2**31 records in all models).

@uri-rodberg
Copy link
Contributor Author

This is a major change and I recommend raising the version number accordingly (at least to 1.10 or something).

Copy link
Member

@jefftriplett jefftriplett left a comment

Choose a reason for hiding this comment

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

🎉

@jefftriplett
Copy link
Member

cc'ing @frankwiles about the note on bumping a major and this is probably worth manually testing to see if/how Django upgrades fields like this.

@uri-rodberg
Copy link
Contributor Author

uri-rodberg commented Oct 9, 2021

I thought about it and the change to friendship/apps.py might be ignored by Django <= 3.1, and then I added a new migration. So it might be that this change will not be fully supported by Django <= 3.1. I guess if running makemigrations on these versions of Django might revert the migration added by this pull request. So maybe it would require Django version to be at least 3.2.

I checked and I confirm that with Django<3.2 (tested with 3.1.13), a new migration is created if run makemigrations, which reverts all the id fields to AutoField - actually reverting the migration in this pull request. This migration will not be created in Django >= 3.2.

@uri-rodberg
Copy link
Contributor Author

Hi,

According to https://www.djangoproject.com/download/, only Django versions >= 3.2 are supported right now. So you can consider accepting this pull request now while specifying the minimal Django version supported to 3.2.

@jefftriplett
Copy link
Member

I rebased your branch on #182 and reached out to a few friends about the <3.2 support. Will follow up after I hear back. We are overdue for the 4.1 (soon 4.2) trove release and then dropping 3.6. 🔜

…ld" + added migrations.

(Support more than 2**31 records in all models).
@jefftriplett jefftriplett merged commit f8ee1c6 into revsys:main Aug 16, 2024
12 checks passed
@jefftriplett
Copy link
Member

@uri-rodberg thank you!

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