Manual:Archive table

<- MediaWiki architecture < Database layout

The archive table is where MediaWiki temporarily stores deleted articles that may be restored.

It's broadly related to the old table in layout, but there are no row ID numbers so old values of cur_id and old_id are not restored when pages are undeleted. Like in the old table, individual revisions' ar_text contents may be compressed as indicated by 'gzip' in the ar_flags field. There is also not presently a record of when deletion occurred, making it hard to separate multiple delete cycles or distinguish old deletions from recent deletions of pages that haven't been edited in a long time.

"DESCRIBE archive" gives the following:

+---+-+--+-+-+---+ +---+-+--+-+-+---+ +---+-+--+-+-+---+
 * Field        | Type                | Null | Key | Default | Extra |
 * ar_namespace | tinyint(2) unsigned |      |     | 0       |       |
 * ar_title     | varchar(255) binary |      |     |         |       |
 * ar_text      | mediumtext          |      |     |         |       |
 * ar_comment   | tinyblob            |      |     |         |       |
 * ar_user      | int(5) unsigned     |      |     | 0       |       |
 * ar_user_text | varchar(255) binary |      |     |         |       |
 * ar_timestamp | varchar(14) binary  |      |     |         |       |
 * ar_minor_edit | tinyint(1)         |      |     | 0       |       |
 * ar_flags     | tinyblob            |      |     |         |       |