Closed matejv closed 6 months ago
If assets table contains assets with duplicate asset tags and not owner, DB migration will fail with:
Applying netbox_inventory.0007_alter_asset_unique_together_and_more...
...
django.db.utils.IntegrityError: could not create unique index "unique_asset_tag"
DETAIL: Key (asset_tag)=(1110) is duplicated.
To hopefully prevent this from happening to users, I'll hold on merging this PR till the next major version. In the meantime I'll add a management script and a notification to the release notes to the preceding releases to allow people to check and fix their data beforehand.
and move all asset's unique_together to model contratints
see #149