Fix stable migration dependencies for NetBox 4.6

This commit is contained in:
2026-08-19 10:06:44 +02:00
parent 4339b4a159
commit 646c67bbd2
7 changed files with 50 additions and 7 deletions
+33
View File
@@ -0,0 +1,33 @@
# Changelog
## 0.3.1
- Fixed Django migration dependencies for NetBox 4.6.5 through 4.6.8.
- Replaced dynamic `__latest__` dependencies in published migrations with fixed NetBox 4.6 squashed migration names.
- Documented the migration-history issue and the safe upgrade path for affected installations.
### Safe Upgrade Path
If `python manage.py migrate` fails with `InconsistentMigrationHistory` because `netbox_vmware_importer.0001_initial` is applied before a newer NetBox core migration, upgrade the plugin package to version `0.3.1` first and then run migrations normally:
```bash
cd /opt/netbox
source venv/bin/activate
pip install --upgrade --force-reinstall --no-cache-dir git+https://git.mrblake.cc/MrBlake/NetBox-VM-Import.git
cd /opt/netbox/netbox
python manage.py migrate --plan
python manage.py migrate
python manage.py check
sudo systemctl restart netbox netbox-rq
```
No manual edits to the `django_migrations` table and no `--fake` migration should be necessary. Take a database backup before any NetBox or plugin upgrade.
## 0.3.0
- Removed Proxmox sync support.
- Kept legacy Proxmox endpoints visible so administrators can delete old records safely.
- Restricted the plugin UI and sync jobs to VMware vSphere/vCenter endpoints.
+1
View File
@@ -19,3 +19,4 @@
| 0.2.5 | 4.4.0 | 4.6.x |
| 0.2.6 | 4.4.0 | 4.6.x |
| 0.3.0 | 4.4.0 | 4.6.x |
| 0.3.1 | 4.6.5 | 4.6.8 |
+8
View File
@@ -2,6 +2,10 @@
NetBox plugin zum Synchronisieren von VMware vSphere/vCenter VMs nach NetBox.
## Kompatibilitaet
Version `0.3.1` ist fuer NetBox `4.6.5` bis `4.6.8` freigegeben.
## Funktionen
- vCenter/ESXi-Ziele direkt in der NetBox-Weboberflaeche pflegen
@@ -41,6 +45,10 @@ python manage.py migrate netbox_vmware_importer
sudo systemctl restart netbox netbox-rq
```
## Upgrade-Hinweis
Version `0.3.1` behebt instabile Django-Migration-Dependencies aus frueheren Releases. Wenn `python manage.py migrate` mit `InconsistentMigrationHistory` fuer `netbox_vmware_importer.0001_initial` fehlschlaegt, zuerst das Plugin auf `0.3.1` aktualisieren und danach `python manage.py migrate --plan` sowie `python manage.py migrate` normal ausfuehren. Manuelle Aenderungen an `django_migrations` oder `--fake` sollten nicht notwendig sein.
## Nutzung
1. In NetBox unter `VMware Import > Endpoints` ein Ziel anlegen.
+3 -2
View File
@@ -5,10 +5,11 @@ class VMwareImporterConfig(PluginConfig):
name = "netbox_vmware_importer"
verbose_name = "VMware Importer"
description = "Synchronize VMware vSphere virtual machines into NetBox."
version = "0.3.0"
version = "0.3.1"
author = "Internal NetBox Team"
base_url = "vmware-importer"
min_version = "4.4.0"
min_version = "4.6.5"
max_version = "4.6.8"
def ready(self):
super().ready()
@@ -7,9 +7,9 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
("dcim", "__latest__"),
("tenancy", "__latest__"),
("virtualization", "__latest__"),
("dcim", "0001_squashed"),
("tenancy", "0001_squashed_0012"),
("virtualization", "0001_squashed_0022"),
]
operations = [
@@ -5,7 +5,7 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("extras", "__latest__"),
("extras", "0001_squashed"),
("netbox_vmware_importer", "0001_initial"),
]
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "netbox-vmware-importer"
version = "0.3.0"
version = "0.3.1"
description = "NetBox plugin to synchronize VMware vSphere virtual machines into NetBox."
readme = "README.md"
requires-python = ">=3.12"