-
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Validity Version
3.3.2
NetBox Version
4.4.6
Python Version
3.10
Steps to Reproduce
Validity’s squashed initial migration (0010_squashed_initial) tries to create a Custom Field named serializer even though it already exists in the shared database.
Branching replays migrations per branch, but the database is global, so uniqueness constraints apply across all branches.
Expected Behaviour
Migration should be idempotent and skip creating Custom Fields that already exist.
- Have an existing branch
- Install Validity
- Go to UI Branching, select branch click Migrate button
Traceback
Error Message
IntegrityError('duplicate key value violates unique constraint "extras_customfield_name_key"\nDETAIL: Key (name)=(serializer) already exists.')
Log Message
{
"log": [
"Migrating branch core-switch-refresh (branch_7a6mf5u3)",
"Setting branch status to migrating",
"Applying migration validity.0010_squashed_initial",
"duplicate key value violates unique constraint \"extras_customfield_name_key\"\nDETAIL: Key (name)=(serializer) already exists."
]
}Metadata
Metadata
Assignees
Labels
No labels