Skip to content
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

Clean up the unique_fields table #30285

Open
Tracked by #29459
freddyDOTCMS opened this issue Oct 8, 2024 · 0 comments
Open
Tracked by #29459

Clean up the unique_fields table #30285

freddyDOTCMS opened this issue Oct 8, 2024 · 0 comments

Comments

@freddyDOTCMS
Copy link
Contributor

Parent Issue

#29459

User Story

When a Contentlet with a Unique Field, a Unique Field itself, or a Content Type that contains a Unique Field is deleted, we need to clean up the unique_fields table. Here's what to do in each case:

Deleting a Contentlet with a Unique Field: Look for the record containing this Contentlet by checking the contents_id property in the supporting_values JSON field. If the list contains multiple Contentlets, remove the specific Contentlet from the list. If it contains only one Contentlet, remove the entire record.

Deleting a Unique Field: Using the field variable attribute in the supporting_values JSON field, locate all records related to the field and delete them.

Deleting a Content Type with at least one Unique Field: Use the Content Type ID in the supporting_values JSON field and delete all corresponding records.

We also need to implement several API/Factory methods to handle these cases.

Acceptance Criteria

Clean up the unique_fields table

Proposed Objective

Core Features

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

No response

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Current Sprint Backlog
Development

No branches or pull requests

1 participant