update to 2.6.0 #2677

Closed
opened 2025-12-29 18:21:04 +01:00 by adam · 5 comments
Owner

Originally created by @benohara on GitHub (Jun 21, 2019).

Deployed the new code, ran the upgrade script from 2.5.12

On making a request I now get

Database migrations missing - When upgrading to a new NetBox release, the upgrade script must be run to apply any new database migrations. You can run migrations manually by executing python3 manage.py migrate from the command line.

Unsupported PostgreSQL version - Ensure that PostgreSQL version 9.4 or higher is in use. You can check this by connecting to the database using NetBox's credentials and issuing a query for SELECT VERSION().

The complete exception is provided below:

<class 'django.db.utils.ProgrammingError'>

column dcim_powerport.connected_endpoint_id does not exist
LINE 1: ...COUNT(*) AS "__count" FROM "dcim_powerport" WHERE "dcim_powe...

Checking the dcim_portport table shows no colume names connected_endpoint_id

That appears to have been from 0066_cables migration...

dcim/migrations/0066_cables.py: termination_b_id=consoleport.connected_endpoint_id,
dcim/migrations/0066_cables.py: ConsoleServerPort.objects.filter(pk=consoleport.connected_endpoint_id).update(
dcim/migrations/0066_cables.py: termination_b_id=powerport.connected_endpoint_id,
dcim/migrations/0066_cables.py: PowerOutlet.objects.filter(pk=powerport.connected_endpoint_id).update(

That migration does appear to have been applied, back when the upgrade to 2.5.12 was done I believe..

138 | dcim | 0066_cables | 2019-05-24 04:50:11.176777+00

Oh, and running postgresql 10.2

Any ideas?

Originally created by @benohara on GitHub (Jun 21, 2019). Deployed the new code, ran the upgrade script from 2.5.12 On making a request I now get Database migrations missing - When upgrading to a new NetBox release, the upgrade script must be run to apply any new database migrations. You can run migrations manually by executing python3 manage.py migrate from the command line. Unsupported PostgreSQL version - Ensure that PostgreSQL version 9.4 or higher is in use. You can check this by connecting to the database using NetBox's credentials and issuing a query for SELECT VERSION(). The complete exception is provided below: <class 'django.db.utils.ProgrammingError'> column dcim_powerport.connected_endpoint_id does not exist LINE 1: ...COUNT(*) AS "__count" FROM "dcim_powerport" WHERE "dcim_powe... Checking the dcim_portport table shows no colume names connected_endpoint_id That appears to have been from 0066_cables migration... dcim/migrations/0066_cables.py: termination_b_id=consoleport.connected_endpoint_id, dcim/migrations/0066_cables.py: ConsoleServerPort.objects.filter(pk=consoleport.connected_endpoint_id).update( dcim/migrations/0066_cables.py: termination_b_id=powerport.connected_endpoint_id, dcim/migrations/0066_cables.py: PowerOutlet.objects.filter(pk=powerport.connected_endpoint_id).update( That migration does appear to have been applied, back when the upgrade to 2.5.12 was done I believe.. 138 | dcim | 0066_cables | 2019-05-24 04:50:11.176777+00 Oh, and running postgresql 10.2 Any ideas?
adam closed this issue 2025-12-29 18:21:04 +01:00
Author
Owner

@benohara commented on GitHub (Jun 21, 2019):

dom ignore me, missed a step!

@benohara commented on GitHub (Jun 21, 2019): dom ignore me, missed a step!
Author
Owner

@JacksonWrath commented on GitHub (Jun 30, 2019):

@benohara What step did you miss? I ran into this too and I swear I did everything this says:

https://netbox.readthedocs.io/en/stable/installation/upgrading/

@JacksonWrath commented on GitHub (Jun 30, 2019): @benohara What step did you miss? I ran into this too and I swear I did everything this says: https://netbox.readthedocs.io/en/stable/installation/upgrading/
Author
Owner

@JacksonWrath commented on GitHub (Jun 30, 2019):

Ha, found my problem too, but probably different from yours. That said, you should still put what you did wrong so others who do the same thing know what to check!

For me, I switched the install directory for this upgrade, but didn't update the gunicorn config files to reflect the new install path. Updating the referenced locations from the original install guide resolved my problem.

@JacksonWrath commented on GitHub (Jun 30, 2019): Ha, found my problem too, but probably different from yours. That said, you should still put what you did wrong so others who do the same thing know what to check! For me, I switched the install directory for this upgrade, but didn't update the gunicorn config files to reflect the new install path. Updating the referenced locations from the original install guide resolved my problem.
Author
Owner

@eric-gunn commented on GitHub (Jul 17, 2019):

@benohara @JacksonWrath, I'm running into the same issue. Could you explain what you did to solve it?

@eric-gunn commented on GitHub (Jul 17, 2019): @benohara @JacksonWrath, I'm running into the same issue. Could you explain what you did to solve it?
Author
Owner

@DanSheps commented on GitHub (Jul 17, 2019):

You should go to the mailing list to discuss this

@DanSheps commented on GitHub (Jul 17, 2019): You should go to the mailing list to discuss this
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2677