-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix(api): update unique constraint for Provider model to exclude soft… #9054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix(api): update unique constraint for Provider model to exclude soft… #9054
Conversation
…-deleted entries This change modifies the unique constraint on the Provider model to ensure that it only considers non-deleted entries. A new migration has been created to reflect this change in the database schema. Additionally, tests have been added to verify the behavior of soft deletion and the uniqueness of provider entries.
|
✅ Conflict Markers Resolved All conflict markers have been successfully resolved in this pull request. |
|
✅ All necessary |
🔒 Container Security ScanImage: 📊 Vulnerability Summary
3 package(s) affected
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
Context
This change addresses an issue where attempting to soft-delete a provider that was already soft-deleted would result in a duplicate error.
Description
This change modifies the unique constraint on the
Providermodel to ensure that it only considers non-deleted entries.A new migration has been created to reflect this change in the database schema.
Additionally, tests have been added to verify the behavior of soft deletion and the uniqueness of provider entries.
Steps to review
tenant_id,provider,uid). This should succeed.UniqueConstraint)Checklist
API
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.