Cannot add interface in Devices Interface #1109

Closed
opened 2025-12-29 16:29:04 +01:00 by adam · 6 comments
Owner

Originally created by @sacy80 on GitHub (Jul 17, 2017).

Issue type:

Not able to add device interfaces.

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

null value in column "enabled" violates not-null constraint
DETAIL: Failing row contains (224, ETH-P0, 1000, f, , 39, null, null, null, null).

**Python version:2.7.5
**NetBox version:2.0.10

Originally created by @sacy80 on GitHub (Jul 17, 2017). <!-- Please note: GitHub issues are to be used only for feature requests and bug reports. For installation assistance or general discussion, please join us on the mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please indicate "bug report" or "feature request" below. Be sure to search the existing set of issues (both open and closed) to see if a similar issue has already been raised. --> ### Issue type: Not able to add device interfaces. <class 'django.db.utils.IntegrityError'> null value in column "enabled" violates not-null constraint DETAIL: Failing row contains (224, ETH-P0, 1000, f, , 39, null, null, null, null). <!-- If filing a bug, please indicate the version of Python and NetBox you are running. (This is not necessary for feature requests.) --> **Python version:2.7.5 **NetBox version:2.0.10 <!-- If filing a bug, please record the exact steps taken to reproduce the bug and any errors messages that are generated. If filing a feature request, please precisely describe the data model or workflow you would like to see implemented, and provide a use case. -->
adam closed this issue 2025-12-29 16:29:04 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 17, 2017):

This bug report needs more information. Per the contributing guidelines:

When submitting a bug report, please be as descriptive as possible. Be sure to include:

  • The environment in which NetBox is running
  • The exact steps that can be taken to reproduce the issue
  • Any error messages generated
  • Screenshots (if applicable)

Please ensure that your issue includes all of the listed information. If no response is received within a week, this issue will be closed.

@jeremystretch commented on GitHub (Jul 17, 2017): This bug report needs more information. Per the [contributing guidelines](https://github.com/digitalocean/netbox/blob/develop/CONTRIBUTING.md): > When submitting a bug report, please be as descriptive as possible. Be sure to include: > * The environment in which NetBox is running > * The exact steps that can be taken to reproduce the issue > * Any error messages generated > * Screenshots (if applicable) Please ensure that your issue includes all of the listed information. If no response is received within a week, this issue will be closed.
Author
Owner

@sacy80 commented on GitHub (Jul 17, 2017):

hi Jeremy

think have found some leads.

i have go into the database table " dcim_interface" and change table's Columns "enabled" to No "Not NULL?". and it allow for me to add interface in devices.

Im not sure where is the script store so i go to change the DB. will doing this cause other issue?

@sacy80 commented on GitHub (Jul 17, 2017): hi Jeremy think have found some leads. i have go into the database table " dcim_interface" and change table's Columns "enabled" to No "Not NULL?". and it allow for me to add interface in devices. Im not sure where is the script store so i go to change the DB. will doing this cause other issue?
Author
Owner

@sacy80 commented on GitHub (Jul 17, 2017):

netbox db enable

Im just found the script. but not able to see "enable" filed in the method
no enable

@sacy80 commented on GitHub (Jul 17, 2017): ![netbox db enable](https://user-images.githubusercontent.com/30169265/28274301-1e4d70a0-6b43-11e7-9fd1-05ec3009ed63.JPG) Im just found the script. but not able to see "enable" filed in the method ![no enable](https://user-images.githubusercontent.com/30169265/28275717-57b9dae6-6b47-11e7-995a-e925f0b2c66a.JPG)
Author
Owner

@sacy80 commented on GitHub (Jul 20, 2017):

hi jeremy

The environment in which NetBox is running : CentOS 7

The exact steps that can be taken to reproduce the issue: after upgrade from 2.1beta to 2.0.10. in devices, click add interface error.

Any error messages generated

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

null value in column "enabled" violates not-null constraint
DETAIL: Failing row contains (224, ETH-P0, 1000, f, , 39, null, null, null, null).

Screenshots (if applicable)

interface error

@sacy80 commented on GitHub (Jul 20, 2017): hi jeremy The environment in which NetBox is running : CentOS 7 The exact steps that can be taken to reproduce the issue: after upgrade from 2.1beta to 2.0.10. in devices, click add interface error. Any error messages generated <class 'django.db.utils.IntegrityError'> null value in column "enabled" violates not-null constraint DETAIL: Failing row contains (224, ETH-P0, 1000, f, , 39, null, null, null, null). Screenshots (if applicable) ![interface error](https://user-images.githubusercontent.com/30169265/28419558-ecf0a8f0-6d91-11e7-9a0c-e95e6dfa27ea.JPG)
Author
Owner

@jeremystretch commented on GitHub (Jul 21, 2017):

after upgrade from 2.1beta to 2.0.10

You shouldn't be downgrading from the beta to a production release. This requires rolling back the database migrations, though ideally you'd have used a different database entirely. This error is occurring because the 2.0.10 code isn't aware of the enabled column.

@jeremystretch commented on GitHub (Jul 21, 2017): > after upgrade from 2.1beta to 2.0.10 You shouldn't be downgrading from the beta to a production release. This requires rolling back the database migrations, though ideally you'd have used a different database entirely. This error is occurring because the 2.0.10 code isn't aware of the `enabled` column.
Author
Owner

@sacy80 commented on GitHub (Jul 22, 2017):

thanks jeremy. got it, think i will disable for the enable column in the database. as i encounter some error on beta 2.1. stable release 2.0.10 work .
Thanks alot for the info

@sacy80 commented on GitHub (Jul 22, 2017): thanks jeremy. got it, think i will disable for the enable column in the database. as i encounter some error on beta 2.1. stable release 2.0.10 work . Thanks alot for the info
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1109