--- Sheldon Rampton sheldon.rampton@verizon.net wrote:
I'm getting ready to launch my "Disinfopedia," a Wikipedia-inspired "encyclopedia of propaganda." I've seeded the project with a number of articles of my own creation. Before going public, however, I'd like to delete erase the revision history of my articles. There's nothing in the history that I'm trying to hide, but during the period when I had the thing all to myself, I employed some intermediate cut-and-paste editing techniques that I wouldn't want others to emulate once it goes public. Is there an easy way to delete the revision history (using MySQL queries, for example) that won't mess up counters, indexing, etc.?
Counters, indexing, etc are all in the 'cur' table, so you can pretty much do what you will to the 'old' table. If you just want to get rid of history revisions, these should do:
To remove *all* old revisions, leaving only current revisions: DELETE FROM old;
Simple, eh? ;)
To remove all revisions from a certain article, leaving only its current revision: DELETE FROM old WHERE old_namespace=# and old_title='The_title';
Same, but only prior to a certain date: DELETE FROM old WHERE old_namespace=# and old_title='The_title' AND old_timestamp < 'YYYYMMDDHHMMSS';
You may also wish to clear out the recentchanges summary table, which will keep the last few days' worth of changes listed and includes references to the old table. Simplest may be to just wipe it out completely: DELETE FROM recentchanges;
Or again up to a certain time: DELETE FROM recentchanges WHERE rc_timestamp < 'YYYYMMDDHHMMSS';
Anthere wrote:
er....copy the content of the article...delete the article...create it again and paste the content ? :-)
Well, that works too. ;)
-- brion vibber (brion @ pobox.com)