Skip to content

Feature/cms 1359 cli command for deleting remaining elements of a given type#16423

Merged
brandonkelly merged 5 commits into4.14from
feature/cms-1359-cli-command-for-deleting-remaining-elements-of-a-given-type
Jan 14, 2025
Merged

Feature/cms 1359 cli command for deleting remaining elements of a given type#16423
brandonkelly merged 5 commits into4.14from
feature/cms-1359-cli-command-for-deleting-remaining-elements-of-a-given-type

Conversation

@i-just
Copy link
Copy Markdown
Contributor

@i-just i-just commented Jan 13, 2025

Description

If you uninstall a plugin that provides custom elements, those elements can still exist in the database, and the garbage collection won’t be able to clean them up.

This PR adds an elements/delete-all-of-type CLI command for deleting all remaining elements of a given type.

php craft elements/delete-all-of-type verbb\\supertable\\elements\\SuperTableBlockElement

It also supports a --dry-run option, where no actual deletion will be performed.

Related issues

cms-1359

@linear
Copy link
Copy Markdown

linear Bot commented Jan 13, 2025

@i-just i-just requested a review from brandonkelly January 13, 2025 12:25
@brandonkelly brandonkelly changed the base branch from 4.x to 4.14 January 14, 2025 17:17
@brandonkelly brandonkelly merged commit 9cc052f into 4.14 Jan 14, 2025
@brandonkelly brandonkelly deleted the feature/cms-1359-cli-command-for-deleting-remaining-elements-of-a-given-type branch January 14, 2025 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants