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

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

Open uri-rodberg opened this issue 3 years ago • 5 comments

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

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

uri-rodberg avatar Oct 05 '21 14:10 uri-rodberg

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

uri-rodberg avatar Oct 05 '21 14:10 uri-rodberg

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.

jefftriplett avatar Oct 09 '21 15:10 jefftriplett

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 avatar Oct 09 '21 15:10 uri-rodberg

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.

uri-rodberg avatar May 15 '22 02:05 uri-rodberg

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. 🔜

jefftriplett avatar Jan 28 '23 15:01 jefftriplett