Problem/Motivation

As we will add a feature to delete all revisions of a specific node prior to a selected one in #3072960: Port node_revision_bulk_delete to D8 and merge to node_revision_delete will be great to have a drush command to have the same feature from the command line.

Proposed resolution

Create a new drush command to delete all revisions of a specific node prior to a selected one.
Maybe we need to create some child issues to split the tasks as we maybe will need some validation for this command.

Remaining tasks

Define the drush command structure.
Update the README.txt file with the new command.
Update the Project Page with the drush command.

User interface changes

None.

API changes

A new drush command will be available.

Data model changes

None.

Release notes snippet

A release note must be published explaining how to use the drush command.

Comments

adriancid created an issue. See original summary.

adriancid’s picture

Title: Create a drush command to delete all revisions of a node » Create a drush command to delete the prior revisions of a node
robert ngo’s picture

Assigned: Unassigned » robert ngo
robert ngo’s picture

Add drush command to delete revisions prior to a revision.

drush nrd-dpr --help
Define which prior revisions to which revision of which node to delete.

Examples:
 nrd-delete-prior-revisions 1 3            Delete all revisions prior to revision id 3 of node of id 1

Arguments:
 nid                                       The id of the node which revisions will be deleted.                    
 vid                                       The revision id, all prior revisions to this revisions will be delete.

Aliases: nrd-dpr

Usage:
drush nrd-dpr 1 3

robert ngo’s picture

Status: Active » Needs review
robert ngo’s picture

Updated patch to fix some English typos.

  • adriancid committed 36b255e on 8.x-1.x authored by Robert Ngo
    Issue #3073007 by Robert Ngo, adriancid: Create a drush command to...

  • adriancid committed 0af3b30 on 7.x-3.x
    Issue #3073007 by Robert Ngo, adriancid: Create a drush command to...

  • adriancid committed 055c254 on 8.x-1.x
    Issue #3073007 by Robert Ngo, adriancid: Create a drush command to...
adriancid’s picture

Status: Needs review » Fixed

  • adriancid committed 4e0e08c on 7.x-3.x
    Issue #3073007 by Robert Ngo, adriancid: Create a drush command to...

  • adriancid committed a696b1b on 8.x-1.x
    Issue #3073007 by Robert Ngo, adriancid: Create a drush command to...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.