Cable status schema migration is broken #3141

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

Originally created by @jeremystretch on GitHub (Jan 9, 2020).

Environment

  • Python version: 3.6.8
  • NetBox version: 2.7-beta1

Steps to Reproduce

  1. Migrate a v2.6 database to v2.7-beta1
  2. View the cables list

Expected Behavior

The legacy status BooleanField is migrated to a CharField as part of the upgrade. True should be replaced with connected and False should be replaced with planned.

Observed Behavior

The status field is retaining the string form of its previous boolean value (e.g. true or false). The first six cables in the example below have had their statuses corrected manually via the NetBox UI:

netbox=> select id, status from dcim_cable order by id limit 10;
 id |  status   
----+-----------
  1 | planned
  2 | planned
  3 | planned
  4 | connected
  5 | connected
  6 | connected
  7 | true
  8 | true
  9 | true
 10 | true
Originally created by @jeremystretch on GitHub (Jan 9, 2020). ### Environment * Python version: 3.6.8 * NetBox version: 2.7-beta1 ### Steps to Reproduce 1. Migrate a v2.6 database to v2.7-beta1 2. View the cables list ### Expected Behavior The legacy `status` BooleanField is migrated to a CharField as part of the upgrade. `True` should be replaced with `connected` and `False` should be replaced with `planned`. ### Observed Behavior The status field is retaining the string form of its previous boolean value (e.g. `true` or `false`). The first six cables in the example below have had their statuses corrected manually via the NetBox UI: ``` netbox=> select id, status from dcim_cable order by id limit 10; id | status ----+----------- 1 | planned 2 | planned 3 | planned 4 | connected 5 | connected 6 | connected 7 | true 8 | true 9 | true 10 | true ```
adam added the type: bugstatus: accepted labels 2025-12-29 18:26:04 +01:00
adam closed this issue 2025-12-29 18:26:04 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3141