User:RichMorin/mw validate

For article validation (unused at this time; the validation code has been removed).

Inter-table Relationships

edit
  • val_page - page ID ( page.page_id)
  • val_revision - revision ID ( revision.rev_id)
  • val_user - user ID ( user.user_id)


MySQL Table Description

edit
mysql> desc mw_validate;
+--------------+------------------+------+-----+---------+-------+
| Field        | Type             | Null | Key | Default | Extra |
+--------------+------------------+------+-----+---------+-------+
| val_user     | int(11)          |      | MUL | 0       |       |
| val_page     | int(11) unsigned |      |     | 0       |       |
| val_revision | int(11) unsigned |      |     | 0       |       |
| val_type     | int(11) unsigned |      |     | 0       |       |
| val_value    | int(11)          | YES  |     | 0       |       |
| val_comment  | varchar(255)     |      |     |         |       |
| val_ip       | varchar(20)      |      |     |         |       |
+--------------+------------------+------+-----+---------+-------+
7 rows in set


Annotated Table Creation Code

edit
-- For article validation

CREATE TABLE /*$wgDBprefix*/validate (

  val_user            int(11)                     NOT NULL  default '0',
  val_page            int(11)        unsigned     NOT NULL  default '0',
  val_revision        int(11)        unsigned     NOT NULL  default '0',
  val_type            int(11)        unsigned     NOT NULL  default '0',
  val_value           int(11)                               default '0',
  val_comment         varchar(255)                NOT NULL  default '',
  val_ip              varchar(20)                 NOT NULL  default '',

KEY                   val_user (val_user, val_revision)

) ENGINE=InnoDB;