Hi Markus, I was thinking same.

On Sat, 3 Sep 2022, 14:02 Markus Holtermann, <[email protected]>
wrote:

> This is expected and by design. Because in the model where you define the
> foreign key, you also don't define its type. The type is automatically
> resolved through the column type from the target model.
>
> Cheers
> Markus
>
> On Fri, Sep 2, 2022, at 10:39 AM, Manasvi Dobariya wrote:
>
> I have default primary key in the model which is being referenced as
> foreign key in another model. Now, when I change this primary key type from
> AutoField to BigAutoField, migrations for only primary keys are being
> generated no migration for foreign key is generated. However, when I apply
> the migration generated for primary key, foreign key type also gets changed
> from int to bigint in postgres database. Is it expected that migrations for
> foreign key will not get generated?
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a4cbdf90-bd62-46a7-9657-1c7ba39509c2n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/a4cbdf90-bd62-46a7-9657-1c7ba39509c2n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e7f4affd-a1e2-4c71-bcf0-175d0f700303%40beta.fastmail.com
> <https://groups.google.com/d/msgid/django-users/e7f4affd-a1e2-4c71-bcf0-175d0f700303%40beta.fastmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BU2%3DaiC5v9orJy6HpPTw4wBZgx%3Dgps41fNMtWBGORL7hEB7-g%40mail.gmail.com.

Reply via email to