r17496 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17495‎ | r17496 | r17497 >
Date:22:53, 8 November 2006
Author:greg
Status:old
Tags:
Comment:
Standardize whitespace and caps: makes diffing with ../ easier
Modified paths:
  • /trunk/phase3/maintenance/mysql5/tables.sql (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/mysql5/tables.sql
@@ -36,7 +36,7 @@
3737 -- in early 2002 after a lot of trouble with the fields
3838 -- auto-updating.
3939 --
 40+-- The Postgres backend uses DATETIME fields for timestamps,
4041 -- and we will migrate the MySQL definitions at some point as
4142 -- well.
4243 --
@@ -114,18 +114,18 @@
115115 -- Initially NULL; when a user's e-mail address has been
116116 -- validated by returning with a mailed token, this is
117117 -- set to the current timestamp.
118 - user_email_authenticated CHAR(14) BINARY,
 118+ user_email_authenticated char(14) binary,
119119
120120 -- Randomly generated token created when the e-mail address
121121 -- is set and a confirmation test mail sent.
122 - user_email_token CHAR(32) BINARY,
 122+ user_email_token char(32) binary,
123123
124124 -- Expiration date for the user_email_token
125 - user_email_token_expires CHAR(14) BINARY,
 125+ user_email_token_expires char(14) binary,
126126
127127 -- Timestamp of account registration.
128128 -- Accounts predating this schema addition may contain NULL.
129 - user_registration CHAR(14) BINARY,
 129+ user_registration char(14) binary,
130130
131131 PRIMARY KEY user_id (user_id),
132132 UNIQUE INDEX user_name (user_name),
@@ -382,7 +382,7 @@
383383 pl_namespace int NOT NULL default '0',
384384 pl_title varchar(255) binary NOT NULL default '',
385385
386 - UNIQUE KEY pl_from(pl_from,pl_namespace,pl_title),
 386+ UNIQUE KEY pl_from (pl_from,pl_namespace,pl_title),
387387 KEY (pl_namespace,pl_title)
388388
389389 ) ENGINE=InnoDB, DEFAULT CHARSET=utf8;
@@ -402,7 +402,7 @@
403403 tl_namespace int NOT NULL default '0',
404404 tl_title varchar(255) binary NOT NULL default '',
405405
406 - UNIQUE KEY tl_from(tl_from,tl_namespace,tl_title),
 406+ UNIQUE KEY tl_from (tl_from,tl_namespace,tl_title),
407407 KEY (tl_namespace,tl_title)
408408
409409 ) ENGINE=InnoDB, DEFAULT CHARSET=utf8;
@@ -422,7 +422,7 @@
423423 -- all such pages are in namespace 6 (NS_IMAGE).
424424 il_to varchar(255) binary NOT NULL default '',
425425
426 - UNIQUE KEY il_from(il_from,il_to),
 426+ UNIQUE KEY il_from (il_from,il_to),
427427 KEY (il_to)
428428
429429 ) ENGINE=InnoDB, DEFAULT CHARSET=utf8;
@@ -456,13 +456,13 @@
457457 -- sorting method by approximate addition time.
458458 cl_timestamp timestamp NOT NULL,
459459
460 - UNIQUE KEY cl_from(cl_from,cl_to),
 460+ UNIQUE KEY cl_from (cl_from,cl_to),
461461
462462 -- We always sort within a given category...
463 - KEY cl_sortkey(cl_to,cl_sortkey),
 463+ KEY cl_sortkey (cl_to,cl_sortkey),
464464
465465 -- Not really used?
466 - KEY cl_timestamp(cl_to,cl_timestamp)
 466+ KEY cl_timestamp (cl_to,cl_timestamp)
467467
468468 ) ENGINE=InnoDB, DEFAULT CHARSET=utf8;
469469
@@ -556,7 +556,7 @@
557557 -- that have been visited.)
558558 --
559559 CREATE TABLE /*$wgDBprefix*/hitcounter (
560 - hc_id INTEGER UNSIGNED NOT NULL
 560+ hc_id int unsigned NOT NULL
561561 ) ENGINE=HEAP MAX_ROWS=25000;
562562
563563
@@ -633,14 +633,14 @@
634634 img_size int(8) unsigned NOT NULL default '0',
635635
636636 -- For images, size in pixels.
637 - img_width int(5) NOT NULL default '0',
638 - img_height int(5) NOT NULL default '0',
 637+ img_width int(5) NOT NULL default '0',
 638+ img_height int(5) NOT NULL default '0',
639639
640640 -- Extracted EXIF metadata stored as a serialized PHP array.
641641 img_metadata mediumblob NOT NULL,
642642
643643 -- For images, bits per pixel if known.
644 - img_bits int(3) NOT NULL default '0',
 644+ img_bits int(3) NOT NULL default '0',
645645
646646 -- Media type as defined by the MEDIATYPE_xxx constants
647647 img_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
@@ -709,7 +709,7 @@
710710 --
711711 CREATE TABLE /*$wgDBprefix*/filearchive (
712712 -- Unique row id
713 - fa_id int not null auto_increment,
 713+ fa_id int NOT NULL auto_increment,
714714
715715 -- Original base filename; key to image.img_name, page.page_title, etc
716716 fa_name varchar(255) binary NOT NULL default '',
@@ -736,10 +736,10 @@
737737
738738 -- Duped fields from image
739739 fa_size int(8) unsigned default '0',
740 - fa_width int(5) default '0',
741 - fa_height int(5) default '0',
 740+ fa_width int(5) default '0',
 741+ fa_height int(5) default '0',
742742 fa_metadata mediumblob,
743 - fa_bits int(3) default '0',
 743+ fa_bits int(3) default '0',
744744 fa_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
745745 fa_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") default "unknown",
746746 fa_minor_mime varchar(32) default "unknown",
@@ -815,7 +815,7 @@
816816 INDEX rc_timestamp (rc_timestamp),
817817 INDEX rc_namespace_title (rc_namespace, rc_title),
818818 INDEX rc_cur_id (rc_cur_id),
819 - INDEX new_name_timestamp(rc_new,rc_namespace,rc_timestamp),
 819+ INDEX new_name_timestamp (rc_new,rc_namespace,rc_timestamp),
820820 INDEX rc_ip (rc_ip),
821821 INDEX rc_ns_usertext ( rc_namespace, rc_user_text )
822822
@@ -904,10 +904,10 @@
905905
906906 -- A boolean value indicating whether the wiki is in this project
907907 -- (used, for example, to detect redirect loops)
908 - iw_local BOOL NOT NULL,
 908+ iw_local bool NOT NULL,
909909
910910 -- Boolean value indicating whether interwiki transclusions are allowed.
911 - iw_trans TINYINT(1) NOT NULL DEFAULT 0,
 911+ iw_trans tinyint(1) NOT NULL default 0,
912912
913913 UNIQUE KEY iw_prefix (iw_prefix)
914914
@@ -935,11 +935,11 @@
936936 -- For a few generic cache operations if not using Memcached
937937 --
938938 CREATE TABLE /*$wgDBprefix*/objectcache (
939 - keyname char(255) binary not null default '',
 939+ keyname char(255) binary NOT NULL default '',
940940 value mediumblob,
941941 exptime datetime,
942 - unique key (keyname),
943 - key (exptime)
 942+ UNIQUE KEY (keyname),
 943+ KEY (exptime)
944944
945945 ) ENGINE=InnoDB, DEFAULT CHARSET=utf8;
946946
@@ -947,10 +947,10 @@
948948 -- Cache of interwiki transclusion
949949 --
950950 CREATE TABLE /*$wgDBprefix*/transcache (
951 - tc_url VARCHAR(255) NOT NULL,
952 - tc_contents TEXT,
953 - tc_time INT NOT NULL,
954 - UNIQUE INDEX tc_url_idx(tc_url)
 951+ tc_url varchar(255) NOT NULL,
 952+ tc_contents text,
 953+ tc_time int NOT NULL,
 954+ UNIQUE INDEX tc_url_idx (tc_url)
955955 ) ENGINE=InnoDB, DEFAULT CHARSET=utf8;
956956
957957 CREATE TABLE /*$wgDBprefix*/logging (
@@ -984,14 +984,15 @@
985985 ) ENGINE=InnoDB, DEFAULT CHARSET=utf8;
986986
987987 CREATE TABLE /*$wgDBprefix*/trackbacks (
988 - tb_id integer AUTO_INCREMENT PRIMARY KEY,
989 - tb_page integer REFERENCES page(page_id) ON DELETE CASCADE,
990 - tb_title varchar(255) NOT NULL,
991 - tb_url varchar(255) NOT NULL,
992 - tb_ex text,
993 - tb_name varchar(255),
 988+ tb_id int auto_increment,
 989+ tb_page int REFERENCES page(page_id) ON DELETE CASCADE,
 990+ tb_title varchar(255) NOT NULL,
 991+ tb_url varchar(255) NOT NULL,
 992+ tb_ex text,
 993+ tb_name varchar(255),
994994
995 - INDEX (tb_page)
 995+ PRIMARY KEY (tb_id),
 996+ INDEX (tb_page)
996997 ) ENGINE=InnoDB, DEFAULT CHARSET=utf8;
997998
998999 -- Jobs performed by parallel apache threads or a command-line daemon
@@ -1017,14 +1018,14 @@
10181019 -- Details of updates to cached special pages
10191020 CREATE TABLE /*$wgDBprefix*/querycache_info (
10201021
1021 - -- Special page name
1022 - -- Corresponds to a qc_type value
1023 - qci_type varchar(32) NOT NULL default '',
 1022+ -- Special page name
 1023+ -- Corresponds to a qc_type value
 1024+ qci_type varchar(32) NOT NULL default '',
10241025
1025 - -- Timestamp of last update
1026 - qci_timestamp char(14) NOT NULL default '19700101000000',
 1026+ -- Timestamp of last update
 1027+ qci_timestamp char(14) NOT NULL default '19700101000000',
10271028
1028 - UNIQUE KEY ( qci_type )
 1029+ UNIQUE KEY ( qci_type )
10291030
10301031 ) ENGINE=InnoDB;
10311032