Skip to content
Discussion options

You must be logged in to vote

psycopg2.errors.UniqueViolation: could not create unique index "dcim_device_unique_name_site_tenant"
DETAIL: Key (lower(name::text), site_id, tenant_id)=(nexus 3048 tp, 21, 12) is duplicated.

When upgrading from 3.3.x to 3.5.x, you first need to check the release notes for v3.4.0 and v3.5.0 for breaking changes.

In this case, you've been caught by the following change in v3.4:

* Device and virtual machine names are no longer case-sensitive. Attempting to create e.g. "device1" and "DEVICE1" within the same site will raise a validation error.

The Postgres error message is saying that the combination of (lowercased device name, site, tenant) must be unique, and it can't create the index if…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cryansharp
Comment options

Answer selected by cryansharp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants