Skip to content

Issue during upgrade from 3.2.6 to 3.3.6 #11957

Discussion options

You must be logged in to vote

Code ref: https://github.com/netbox-community/netbox/blob/v3.4.5/netbox/dcim/migrations/0158_populate_cable_terminations.py#L41-L54

Looks like you have a cable whose endpoint points to a console port that doesn't exist. Unfortunately, these Generic Foreign Keys cannot have their refential integrity enforced by the database itself like regular foreign keys, and so it relies on the Django code to maintain them - which doesn't always do it properly.

What that code is doing is effectively:

select id, termination_a_type, termination_a_id, termination_b_type, termination_b_id from dcim_cable;

and then iterating through those rows to create new cable termination objects. But there's at least on…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by muzaffarhal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants