Closed (fixed)
Project:
Delete all
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
14 Oct 2009 at 18:57 UTC
Updated:
16 Mar 2010 at 15:50 UTC
Jump to comment: Most recent file
HI there,
Is there anyway I can call delete-all from command line or drush? I'm thinking about using such feature to automatically wipe out all data to have a vanilla site for QA purpose.
Thanks for any helps in advance.
--halhx
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | delete_all.drush-2.inc_.gz | 587 bytes | okokokok |
| #2 | delete_all.drush_.inc_.gz | 441 bytes | okokokok |
Comments
Comment #1
kbahey commentedNot at present, but it is a nice feature to have.
Anyone with patches, please submit them for review and testing.
Comment #2
okokokok commentedI uploaded some drush code to do this.
It's not yet working, even though it's actually executing node_delete($data->nid) in _delete_all_normal()
Comment #3
okokokok commentedI figured that it was a permission problem, and adding -u admin did the trick.
e.g.
drush -u admin delete-all pageComment #4
okokokok commentedNow
drush delete-allwill give an overview of content types and number of nodes, also removed some references to OpenID Admin (where I took the drush.inc from).Comment #5
kbahey commentedThank you.
This is now committed, and should be in the tarball in about 11 hours from now.
Comment #6
okokokok commentedCool. You took the first file I uploaded though.
delete_all.drush-2.inc_.gz is significantly better.
Comment #7
kbahey commentedComment #8
okokokok commentedI added drush_drupal_login(1); so that stuff is actually deleted all the time.
But I'm waiting with a patch until I have a y/n confirmation thing added as well.