-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
relation "extras_customfield_object_types_id_seq" already exists #16625
Comments
After spending a few days on this, I checked 0111_rename_content_types.py file and saw that the migration tries to rename relations twice to the same name which leads to duplicate error. After commenting below code in "0111_rename_content_types.py" The upgrade went through but I'm unsure if this is the correct solution.
The upgrade path I followed was v3.2.1 --> v3.7.8 --> v4.0.5 |
Looks like a potential edge case from older installs, I'm guessing there should probably be a check if extras_customfield_object_types_id_seq already exists then skip the second ALTER TABLE in the below code from 0111_rename_content_types.py
|
Is there a fix for this yet - for the docker version? The first ALTER TABLE command works on the database but the netbox DB migrations runs the second one. |
@SwaroopGiri @bbruun can either/both of you please test Draft PR #16893 and see if that resolves the issue. |
Closing due to lack of any response and an edge case. |
I didn't get any notification for some reason on Jul 12, don't know why, so I'm very sorry for the late response. I'm running the docker version and I've played around with your update in
My solution to fix it was to make a local image using the 0111_rename_content_types.py migrations file v4.0.1-2.9.1 and then update as above and build it manually to get the migrations done before moving on to v4.0.9-2.9.1 in the upgrade process to get to v4.1.2-3.0.2.
So I'm able to go from old v2.10.8 to v2.11 -> v3.0.0 -> v3.2-2.0.0 -> v3.2.9-2.1.0 -> v3.7.8-2.8.0 -> v4.0.1-2.9.1-custom -> v4.0.9-2.9.1 -> v4.1-3.0.1 -> v4.1.2-3.0.2.
I now have a fully 4.1.2 version running and no errors on any of the steps in the upgrade process. Thanks for #16893 @arthanson it is much appreciated. |
Deployment Type
Self-hosted
NetBox Version
v3.7.8
Python Version
3.12
Steps to Reproduce
Expected Behavior
Upgrade complete! Don't forget to restart the NetBox services:
Observed Behavior
The text was updated successfully, but these errors were encountered: