Upgrading Netbox from Version 3.3.7 to latest #11480
Unanswered
github6043
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Same here, I had to do: sudo PYTHON=/usr/bin/python3.9 NETBOX_DELETE_LEGACY_DATA=1 ./upgrade.sh |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
NetBox version
3.3.7
Python version
3.8
Steps to Reproduce
Hi all, I try to upgrade Netbox and get errors at the end a non working system. Any help ist appreciated.
Running migrations:
Applying circuits.0039_unique_constraints... OK
Applying circuits.0040_provider_remove_deprecated_fields...Traceback (most recent call last):
File "netbox/manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/init.py", line 446, in execute_from_command_line
utility.execute()
File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/init.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/base.py", line 402, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/base.py", line 448, in execute
output = self.handle(*args, **options)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/base.py", line 96, in wrapped
res = handle_func(*args, **kwargs)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 349, in handle
post_migrate_state = executor.migrate(
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/executor.py", line 135, in migrate
state = self._migrate_all_forwards(
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards
state = self.apply_migration(
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/executor.py", line 252, in apply_migration
state = migration.apply(state, schema_editor)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/migration.py", line 130, in apply
operation.database_forwards(
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/operations/special.py", line 193, in database_forwards
self.code(from_state.apps, schema_editor)
File "/opt/netbox/netbox/circuits/migrations/0040_provider_remove_deprecated_fields.py", line 24, in check_legacy_data
raise DataError(
django.db.utils.DataError: Unable to proceed with deleting contact fields from Provider model: Found 1 providers with legacy contact data. Please ensure all legacy provider contact data has been migrated to contact objects before proceeding. Or, set the NETBOX_DELETE_LEGACY_DATA environment variable to bypass this safeguard and delete all legacy provider contact data.
Expected Behavior
Running Version 3.4.2
Observed Behavior
Beta Was this translation helpful? Give feedback.
All reactions