Sorry, I meant to do that. Here's the link to the ticket:
    https://code.djangoproject.com/ticket/32367

I get an output similar to that of the ticket when I run `./manage 
makemigrations`:

        HINT: Configure the DEFAULT_AUTO_FIELD setting or the 
AppConfig.default_auto_field attribute to point to a subclass of AutoField, 
e.g. 'django.db.models.BigAutoField'.
myapp.MyClass: (models.W042) Auto-created primary key used when not 
defining a primary key type, by default 'django.db.models.AutoField'.
        HINT: Configure the DEFAULT_AUTO_FIELD setting or the 
AppConfig.default_auto_field attribute to point to a subclass of AutoField, 
e.g. 'django.db.models.BigAutoField'.

(duplicated about 30 times because I have many such classes) 

The primary key for these models has not changed since Django 0.90 and 
there was no issue in Django 3.1.
It started output HINT messages in Django 3.2 beta 1.
I have the same behaviour in Django 3.2 rc 1.

When I try the suggested workaround from the ticket, i.e.:
   DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

the migrations files contain the following migrations which I neeed to 
remove manually:

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

Caram

Le jeudi 25 mars 2021 à 15:55:27 UTC+1, timog...@gmail.com a écrit :

> Hi, It would be helpful to link to the ticket and/or explain the issue in 
> more detail.
>
> On Thursday, March 25, 2021 at 9:28:09 AM UTC-4 Caram wrote:
>
>>
>> This issue was raised in alpha1, but I still had the issue in beta1 and 
>> now also in rc1.
>>
>> As a result, I have to manually edit the migrations files and remove 
>> lines that alter fields to become BigField().
>>
>> Has this really been fixed? Am I missing something obvious?
>>
>> Caram
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/8c50cb23-9fe2-44a2-afac-e0632b791476n%40googlegroups.com.

Reply via email to