Manual:deleteArchivedRevisions.php
<translate> MediaWiki version:</translate> |
MediaWiki ファイル: deleteArchivedRevisions.php | |
---|---|
場所: | maintenance/ |
ソース コード: | master • 1.41.1 • 1.40.3 • 1.39.7 |
クラス: | DeleteArchivedRevisions |
詳細
deleteArchivedRevisions.php file is a maintenance script to delete all the archived (hidden from public view) revisions, by clearing out the archive table. これらの版は復元できなくなります。 Deleted pages and archived revisions to a given page are permanently deleted, but the complete history of existing pages will remain.
When a page is 'deleted' by an administrator (Help:削除と復元 ), records are moved from the 'revision' table to the 'archive' table, although the bulk of the data (page text) remains in the 'text' table. The script deletes all records from the archive table and then invokes purgeOldText.php to purge the text records which no revision links to. This can be useful for reducing the size of the database but it does mean you lose the ability to restore the according revisions.
Prior to MediaWiki 1.16, a helper file deleteArchivedRevisions.inc contained the class that performs the work. This class was merged into deleteArchivedRevisions.php in 1.16.
オプション/引数
オプション | 説明 | 必須かどうか |
---|---|---|
--delete | Does the deletion (otherwise only displays the number of revisions to delete). | <translate> Optional</translate> |
使用法
php maintenance/deleteArchivedRevisions.php [ --delete ]
Checking potential deletion
$ php maintenance/deleteArchivedRevisions.php Found 7 revisions to delete. Please run the script again with the --delete option to really delete the revisions.
Making actual deletion
$ php maintenance/deleteArchivedRevisions.php --delete Deleting archived revisions...done. 7 revisions deleted.