Because submission can take a long time to clear, a drush command would be helpful.

Comments

DanChadwick created an issue. See original summary.

danchadwick’s picture

Status: Active » Fixed
StatusFileSize
new6.58 KB

Usage:

drush webform-clear NID [--batch_size=NNNNN] [-y]

Committed to 7.x-4.x.

  • DanChadwick committed 581381f on 7.x-4.x
    Issue #2575875 by DanChadwick: Added drush command webform-clear to...
danchadwick’s picture

Version: 7.x-4.x-dev » 8.x-4.x-dev
Category: Feature request » Task
Status: Fixed » Patch (to be ported)

Needs up-port to D8.

Commit after related issue.

fenstrat’s picture

Version: 8.x-4.x-dev » 7.x-4.x-dev
Category: Task » Feature request
Status: Patch (to be ported) » Fixed

Committed and pushed to 8.x-4.x.

  • fenstrat committed 722a390 on 8.x-4.x
    Issue #2575875 by DanChadwick: Added drush command webform-clear to...

Status: Fixed » Closed (fixed)

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

alan d.’s picture

For interested bystanders, the all option via hook_drush_sql_sync_sanitize().

fgjohnson@lojoh.ca’s picture

Hey,
Anyway to clear all submissions for ALL nids?

I can get all distinct nids using
drush sql-query 'SELECT distinct 'nid' FROM 'webform_submissions' WHERE 1'

Something like:
drush -y webform-clear while(SELECT distinct 'nid' FROM 'webform_submissions' WHERE 1')

Can you tell I'm an awesome programmer? :-)