Database broken after using API #10214

Closed
opened 2025-12-29 21:28:28 +01:00 by adam · 3 comments
Owner

Originally created by @mikygee on GitHub (Sep 10, 2024).

Deployment Type

Self-hosted

NetBox Version

v4.0.11

Python Version

3.10

Steps to Reproduce

Not known yet

Expected Behavior

Netbox to work normally

Observed Behavior

Hello I messed up using API,
I was trying to add a new platform like this
PUT $data = '{ "name": "' . "SOMENAME .'", "slug": "' . "somename" .'", "manufacturer": 1, "description": "' . "somedesc" . '" }';
or
$data = '{ "name": "' . "SOMENAME" .'", "slug": "' . "somename" .'", "manufacturer": { "id": ' . "1" . ' }, "description": "' . "somedesc" . '" }';

Now I see this message when I want to add a new platform or manufacturer

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

relation "extras_objectchange" does not exist
LINE 1: INSERT INTO "extras_objectchange" ("time", "user_id", "user_...
# \d extras_objectchange
Did not find any relation named "extras_objectchange".

python3 manage.py migrate didn't help

I think it's not normal that I broke the database structure using APIs

Also how can I fix it ?

Originally created by @mikygee on GitHub (Sep 10, 2024). ### Deployment Type Self-hosted ### NetBox Version v4.0.11 ### Python Version 3.10 ### Steps to Reproduce Not known yet ### Expected Behavior Netbox to work normally ### Observed Behavior Hello I messed up using API, I was trying to add a new platform like this `PUT $data = '{ "name": "' . "SOMENAME .'", "slug": "' . "somename" .'", "manufacturer": 1, "description": "' . "somedesc" . '" }';` or `$data = '{ "name": "' . "SOMENAME" .'", "slug": "' . "somename" .'", "manufacturer": { "id": ' . "1" . ' }, "description": "' . "somedesc" . '" }';` Now I see this message when I want to add a new platform or manufacturer ``` <class 'django.db.utils.ProgrammingError'> relation "extras_objectchange" does not exist LINE 1: INSERT INTO "extras_objectchange" ("time", "user_id", "user_... ``` ``` # \d extras_objectchange Did not find any relation named "extras_objectchange". ``` python3 manage.py migrate didn't help I think it's not normal that I broke the database structure using APIs Also how can I fix it ?
adam closed this issue 2025-12-29 21:28:28 +01:00
Author
Owner

@quantum909 commented on GitHub (Sep 10, 2024):

See here

@quantum909 commented on GitHub (Sep 10, 2024): See [here](https://github.com/netbox-community/netbox/issues/17401])
Author
Owner

@mikygee commented on GitHub (Sep 10, 2024):

Hello quantum909,

Thank you for your message and pointing me this issue #17401

Indeed, I upgraded to 4.1.0 from 4.0.11 but then moved back to 4.0.11.
However, I was coding using APIs and it worked after this upgrade/downgrade.

It seemed to me that I did and action through API that caused this.

@mikygee commented on GitHub (Sep 10, 2024): Hello quantum909, Thank you for your message and pointing me this issue #17401 Indeed, I upgraded to 4.1.0 from 4.0.11 but then moved back to 4.0.11. However, I was coding using APIs and it worked after this upgrade/downgrade. It seemed to me that I did and action through API that caused this.
Author
Owner

@quantum909 commented on GitHub (Sep 10, 2024):

Did you tryed this

@quantum909 commented on GitHub (Sep 10, 2024): Did you tryed [this](https://github.com/netbox-community/netbox/discussions/17388#discussioncomment-10582898)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10214