-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial NetBox 3.4.x migration fails when a plugin using SearchIndex is installed #11248
Comments
We can tweak the migration to simply skip any indexers whose tables don't exist yet, which should address the problem cited here. (This should be non-impacting, as if the table doesn't exist there's no data to index anyway.) However, there's also a scenario where indexing gets skipped if a plugin adds a new field to an existing table, which would require that the user manually re-generate the search cache for the plugin model. |
Exactly that happens with my plugin ... but I don't think it's a major issue, I can add the reindexing code to the migration for the plugin. |
Can the |
NetBox version
3.4.1
Python version
3.8
Steps to Reproduce
Expected Behavior
The migration succeeds
Observed Behavior
The migration fails with ProgrammingError exception:
The
netbox_dns_nameserver
relation for thenetbox_dns.models.NameServer
model usesSearchIndex
:That results in the NetBox migration
extras.0083_search
trying to reindex the plugin's relation, which does not exist yet at that point.The obvious workaround is to disable the plugin, run the migration, re-enable the plugin and then run the migration again.
The text was updated successfully, but these errors were encountered: