Convert IntegerFields used by generic foreign keys to BigIntegerFields #5856

Closed
opened 2025-12-29 19:33:31 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Dec 30, 2021).

Originally assigned to: @jeremystretch on GitHub.

Proposed Changes

Some time ago, we converted the default primary key for all NetBox models to 64-bit BigAutoFields (a derivative of BigIntegerField). However, we did not do the same for integer fields which are used as part of a GenericForeignKey reference. These fields also need to be converted.

Justification

This ensures that the GenericForeignKey relationships continue to function normally in the unlikely event that a user exceeds the maximum value of PositiveIntegerField.

Originally created by @jeremystretch on GitHub (Dec 30, 2021). Originally assigned to: @jeremystretch on GitHub. ### Proposed Changes Some time ago, we converted the default primary key for all NetBox models to 64-bit BigAutoFields (a derivative of BigIntegerField). However, we did not do the same for integer fields which are used as part of a GenericForeignKey reference. These fields also need to be converted. ### Justification This ensures that the GenericForeignKey relationships continue to function normally in the unlikely event that a user exceeds the maximum value of PositiveIntegerField.
adam added the status: acceptedtype: housekeeping labels 2025-12-29 19:33:31 +01:00
adam closed this issue 2025-12-29 19:33:31 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5856