Migrations fail on the feature branch because search indexing is run before later schema changes #7599

Closed
opened 2025-12-29 20:25:53 +01:00 by adam · 0 comments
Owner

Originally created by @kkthxbye-code on GitHub (Feb 3, 2023).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.5.0-dev

Python version

3.10

Steps to Reproduce

  1. Checkout the feature branch
  2. Run ./upgrade.sh on a clean database

Expected Behavior

The upgrade script should finish.

Observed Behavior

Migration log and exception:

https://gist.github.com/kkthxbye-code/4dd23a639bf0af94e856032fbac83920

The error is caused because extras.0083_search runs before dcim.0167_module_status. The search migration runs the search indexing command, which queries the Module model, which fails because the Model doesn't match the database yet. We might need to remove the indexing command and re-think how initial search indexing should be executed.

Originally created by @kkthxbye-code on GitHub (Feb 3, 2023). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.5.0-dev ### Python version 3.10 ### Steps to Reproduce 1. Checkout the feature branch 2. Run ./upgrade.sh on a clean database ### Expected Behavior The upgrade script should finish. ### Observed Behavior Migration log and exception: https://gist.github.com/kkthxbye-code/4dd23a639bf0af94e856032fbac83920 The error is caused because `extras.0083_search` runs before `dcim.0167_module_status`. The search migration runs the search indexing command, which queries the Module model, which fails because the Model doesn't match the database yet. We might need to remove the indexing command and re-think how initial search indexing should be executed.
adam added the type: bugstatus: acceptedbeta labels 2025-12-29 20:25:53 +01:00
adam closed this issue 2025-12-29 20:25:54 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7599