Manual:Old table/ja

The old table is where MediaWiki versions up to MediaWiki 1.4 store historical versions of articles; these MediaWiki versions store the current version of articles in the cur table. ほとんどのフィールドは cur テーブルのフィールドと一致します.

In MediaWiki 1.5 the contents of the old table and of the cur table were merged together and moved to the page table and the revision table. Finally the old table was renamed to text table. That way the text table also contains some old columns, which were part of the old table, but are now no longer needed in the text table.

After running the updater when updating from MediaWiki 1.4 or older to a newer version, all fields in the text table except old_id, old_text and old_flags are not needed anymore and can be safely deleted.

old_text contents may be compressed, as indicated by "gzip" in the old_flags field. (Data is compressed with the gzdeflate function of PHP: there is no gzip header or checksum, set the window size to negative(?) if not using PHP to read data.)

old_id は各版に付けられた固有のインデックスであり、いくつか注意点があります:
 * Since the cur table carried the most recent revision separately, old_id was not assigned to a revision until it was no longer the most recent version of a page
 * archive テーブルはページの old_id を保存しないため、一度削除し、restor したページのID は異なったものとなります (削除したページの old_id が再利用されることはありません). The revision number (rev_id) however will be used so that links pointing to a specifix revision will still work after deletion/restoration.
 * old_id is not necessarily numerically chronological, either within a given page's history or in the whole database

old_timestamp についても、あるページの履歴の中で必ずしも固有の値を持つとは限りません.

"DESCRIBE old" の情報:

+---+-+--+-+-++ +---+-+--+-+-++ +---+-+--+-+-++
 * Field            | Type                | Null | Key | Default | Extra          |
 * old_id           | int(8) unsigned     |      | PRI | NULL    | auto_increment |
 * old_namespace    | tinyint(2) unsigned |      |     | 0       |                |
 * old_title        | varchar(255) binary |      |     |         |                |
 * old_text         | mediumtext          |      |     |         |                |
 * old_comment      | tinyblob            |      |     |         |                |
 * old_user         | int(5) unsigned     |      |     | 0       |                |
 * old_user_text    | varchar(255) binary |      |     |         |                |
 * old_timestamp    | varchar(14) binary  |      |     |         |                |
 * old_minor_edit   | tinyint(1)          |      |     | 0       |                |
 * old_flags        | tinyblob            |      |     |         |                |
 * inverse_timestamp | varchar(14) binary |      |     |         |                |