Extension:MirrorTools/Core fields

logging.log_mt_push_timestamp
Timestamp the log entry was mirrorpushed.

logging.log_mt_user
Remote wiki user_id.

recentchanges.rc_mt_push_timestamp
Timestamp the recent change was mirrorpushed.

recentchanges.rc_mt_user
Remote wiki user_id.

revision.rev_mt_page
Remote wiki rev_page. This needs to change when pages are undeleted on the remote wiki, because the rev_page won't be preserved.

Apparently the only reason this field is necessary is to hold the value of, because otherwise the rev_page of mirrored revisions should always be equal to the remote wiki rev_page. But even then, the point of this field is unclear because rev_page on the local wiki should be equal to the ar_page_id after the deletion event. So we may get rid of this field, unless its usefulness becomes evident.

revision.rev_mt_user
Remote wiki user_id.

revision.rev_mt_former_page
rev_page from before the revisions were merged into the page history of the mirrored page. A revision can get a rev_mt_former_page value by (1) having a mirrored page moved onto their page, or (2) having mirrored revisions added to their page by either mirrored edits or mirrored undeletions. rev_page will be restored to this value if the mirrored revisions are moved elsewhere or if the mirrored page is deleted. See Extension:MirrorTools/Move_and_mirrormove.

Example:
 * Page A (page_id G) is created locally with revision X.
 * Page B (page id H) is created remotely with revision Y.
 * Page B is then moved remotely to page A.
 * Page A's page_id becomes H.
 * Revision X's rev_page becomes H.
 * Revision X's rev_mt_former_page is set to G.


 * Page A is then moved to page C (keeping the same page_id, H, of course).
 * Revision X's rev_page becomes G, its rev_mt_former_page.

The point of this is so that two principles are adhered to:
 * Wikipedians can't, by moving a page around sequentially to a bunch of page titles occupied by Inclupedia pages, "scoop up" all those Inclupedia revisions in a way that would have to be manually reversed.
 * A Wikipedia page that's moved to an Inclupedia page will, at least temporarily, merge its history with that page's history. If the Wikipedia page is later moved, then it's assumed that in all likelihood, the move was a mistake, so the history merge is reversed.

revision.rev_mt_remotely_live
Does the revision exist on the remote wiki? (if deleted, then 0) An example would be revisions from a Wikipedia page that was deleted, that Inclupedia doesn't see fit to delete. Remotely live revisions are deleted when a page is mirrormoved onto it; it's probably a redirect.

revision.rev_mt_push_timestamp
Timestamp the revision was mirrorpushed.

logging
mysql> describe logging; +---+-+--+-+++ +---+-+--+-+++ +---+-+--+-+++ 14 rows in set (0.00 sec)
 * Field                | Type                | Null | Key | Default        | Extra          |
 * log_id               | bigint(20) unsigned | NO   | PRI | NULL           | auto_increment |
 * log_type             | varbinary(32)       | NO   | MUL |                |                |
 * log_action           | varbinary(32)       | NO   |     |                |                |
 * log_timestamp        | binary(14)          | NO   | MUL | 19700101000000 |                |
 * log_user             | bigint(20) unsigned | YES  | MUL | NULL           |                |
 * log_user_text        | varbinary(255)      | NO   | MUL |                |                |
 * log_namespace        | int(11)             | NO   | MUL | 0              |                |
 * log_title            | varbinary(255)      | NO   |     |                |                |
 * log_page             | bigint(20) unsigned | YES  | MUL | NULL           |                |
 * log_comment          | varbinary(255)      | NO   |     |                |                |
 * log_params           | blob                | NO   |     | NULL           |                |
 * log_deleted          | tinyint(3) unsigned | NO   |     | 0              |                |
 * log_mt_push_timestamp | binary(14)         | NO   |     |                |                |
 * log_mt_user          | bigint(20) unsigned | YES  |     | NULL           |                |

recentchanges
mysql> describe recentchanges; +--+-+--+-+++ +--+-+--+-+++ +--+-+--+-+++ 26 rows in set (0.00 sec)
 * Field               | Type                | Null | Key | Default        | Extra          |
 * rc_id               | bigint(20) unsigned | NO   | PRI | NULL           | auto_increment |
 * rc_timestamp        | varbinary(14)       | NO   | MUL |                |                |
 * rc_user             | bigint(20) unsigned | YES  |     | NULL           |                |
 * rc_user_text        | varbinary(255)      | NO   | MUL | NULL           |                |
 * rc_namespace        | int(11)             | NO   | MUL | 0              |                |
 * rc_title            | varbinary(255)      | NO   |     |                |                |
 * rc_comment          | varbinary(255)      | NO   |     |                |                |
 * rc_minor            | tinyint(3) unsigned | NO   |     | 0              |                |
 * rc_bot              | tinyint(3) unsigned | NO   |     | 0              |                |
 * rc_new              | tinyint(3) unsigned | NO   | MUL | 0              |                |
 * rc_cur_id           | bigint(20) unsigned | YES  | MUL | NULL           |                |
 * rc_this_oldid       | bigint(20) unsigned | YES  |     | NULL           |                |
 * rc_last_oldid       | bigint(20) unsigned | YES  |     | NULL           |                |
 * rc_type             | tinyint(3) unsigned | NO   |     | 0              |                |
 * rc_source           | varbinary(16)       | NO   |     |                |                |
 * rc_patrolled        | tinyint(3) unsigned | NO   |     | 0              |                |
 * rc_ip               | varbinary(40)       | NO   | MUL |                |                |
 * rc_old_len          | int(11)             | YES  |     | NULL           |                |
 * rc_new_len          | int(11)             | YES  |     | NULL           |                |
 * rc_deleted          | tinyint(3) unsigned | NO   |     | 0              |                |
 * rc_logid            | bigint(20) unsigned | YES  |     | NULL           |                |
 * rc_log_type         | varbinary(255)      | YES  |     | NULL           |                |
 * rc_log_action       | varbinary(255)      | YES  |     | NULL           |                |
 * rc_params           | blob                | YES  |     | NULL           |                |
 * rc_mt_push_timestamp | binary(14)         | NO   |     |                |                |
 * rc_mt_user          | bigint(20) unsigned | YES  |     | NULL           |                |

revision
mysql> describe revision; +---+-+--+-+++ +---+-+--+-+++ +---+-+--+-+++ 19 rows in set (0.00 sec)
 * Field                | Type                | Null | Key | Default        | Extra          |
 * rev_id               | bigint(20) unsigned | NO   | PRI | NULL           | auto_increment |
 * rev_page             | bigint(20) unsigned | YES  | MUL | NULL           |                |
 * rev_text_id          | int(10) unsigned    | NO   |     | NULL           |                |
 * rev_comment          | tinyblob            | NO   |     | NULL           |                |
 * rev_user             | bigint(20) unsigned | YES  | MUL | NULL           |                |
 * rev_user_text        | varbinary(255)      | NO   | MUL |                |                |
 * rev_timestamp        | binary(14)          | NO   | MUL |                |                |
 * rev_minor_edit       | tinyint(3) unsigned | NO   |     | 0              |                |
 * rev_deleted          | tinyint(3) unsigned | NO   |     | 0              |                |
 * rev_len              | int(10) unsigned    | YES  |     | NULL           |                |
 * rev_parent_id        | bigint(20) unsigned | YES  |     | NULL           |                |
 * rev_sha1             | varbinary(32)       | NO   |     |                |                |
 * rev_content_model    | varbinary(32)       | YES  |     | NULL           |                |
 * rev_content_format   | varbinary(64)       | YES  |     | NULL           |                |
 * rev_mt_page          | bigint(20) unsigned | YES  |     | NULL           |                |
 * rev_mt_user          | bigint(20) unsigned | YES  |     | NULL           |                |
 * rev_mt_push_timestamp | binary(14)         | NO   |     |                |                |
 * rev_mt_former_page   | bigint(20) unsigned | YES  |     | NULL           |                |
 * rev_mt_remotely_live | tinyint(3) unsigned | NO   |     | 0              |                |