r57964 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57963‎ | r57964 | r57965 >
Date:02:46, 21 October 2009
Author:overlordq
Status:ok
Tags:
Comment:
Add missing columns to PG schemas
Add exceptions to schema comparison script
Alter SQL comments to appease said script
Modified paths:
  • /trunk/phase3/maintenance/postgres/compare_schemas.pl (modified) (history)
  • /trunk/phase3/maintenance/postgres/tables.sql (modified) (history)
  • /trunk/phase3/maintenance/tables.sql (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/postgres/compare_schemas.pl
@@ -307,7 +307,8 @@
308308 fa_description tinyblob TEXT
309309 img_description tinyblob TEXT
310310 ipb_reason tinyblob TEXT
311 -log_action varbinary(10) TEXT
 311+log_action varbinary(32) TEXT
 312+log_type varbinary(32) TEXT
312313 oi_description tinyblob TEXT
313314 rev_comment tinyblob TEXT
314315 rc_log_action varbinary(255) TEXT
@@ -323,6 +324,9 @@
324325 ipb_range_end tinyblob TEXT # hexadecimal
325326 ipb_range_start tinyblob TEXT # hexadecimal
326327 img_minor_mime varbinary(32) TEXT
 328+lc_lang varbinary(32) TEXT
 329+lc_value varbinary(32) TEXT
 330+
327331 img_sha1 varbinary(32) TEXT
328332 job_cmd varbinary(60) TEXT # Should we limit to 60 as well?
329333 keyname varbinary(255) TEXT # No tablename prefix (objectcache)
Index: trunk/phase3/maintenance/postgres/tables.sql
@@ -155,7 +155,9 @@
156156 CREATE TABLE redirect (
157157 rd_from INTEGER NOT NULL REFERENCES page(page_id) ON DELETE CASCADE,
158158 rd_namespace SMALLINT NOT NULL,
159 - rd_title TEXT NOT NULL
 159+ rd_title TEXT NOT NULL,
 160+ rd_interwiki TEXT NULL,
 161+ rd_fragment TEXT NULL
160162 );
161163 CREATE INDEX redirect_ns_title ON redirect (rd_namespace,rd_title,rd_from);
162164
@@ -198,6 +200,13 @@
199201 CREATE INDEX externallinks_from_to ON externallinks (el_from,el_to);
200202 CREATE INDEX externallinks_index ON externallinks (el_index);
201203
 204+CREATE TABLE external_user (
 205+ eu_wiki_id INTEGER NOT NULL PRIMARY KEY,
 206+ eu_external_id TEXT
 207+);
 208+
 209+CREATE UNIQUE INDEX eu_external_id ON external_user (eu_external_id);
 210+
202211 CREATE TABLE langlinks (
203212 ll_from INTEGER NOT NULL REFERENCES page (page_id) ON DELETE CASCADE,
204213 ll_lang TEXT,
@@ -624,6 +633,6 @@
625634 CREATE TABLE l10n_cache (
626635 lc_lang TEXT NOT NULL,
627636 lc_key TEXT NOT NULL,
628 - lc_value TEXT NOT NULL
 637+ lc_value BYTEA NOT NULL
629638 );
630639 CREATE INDEX l10n_cache_lc_lang_key ON l10n_cache (lc_lang, lc_key);
Index: trunk/phase3/maintenance/tables.sql
@@ -1298,11 +1298,16 @@
12991299
13001300 -- A table to track tags for revisions, logs and recent changes.
13011301 CREATE TABLE /*_*/change_tag (
1302 - ct_rc_id int NULL, -- RCID for the change
1303 - ct_log_id int NULL, -- LOGID for the change
1304 - ct_rev_id int NULL, -- REVID for the change
1305 - ct_tag varchar(255) NOT NULL, -- Tag applied
1306 - ct_params blob NULL -- Parameters for the tag, presently unused.
 1302+ -- RCID for the change
 1303+ ct_rc_id int NULL,
 1304+ -- LOGID for the change
 1305+ ct_log_id int NULL,
 1306+ -- REVID for the change
 1307+ ct_rev_id int NULL,
 1308+ -- Tag applied
 1309+ ct_tag varchar(255) NOT NULL,
 1310+ -- Parameters for the tag, presently unused
 1311+ ct_params blob NULL
13071312 ) /*$wgDBTableOptions*/;
13081313
13091314 CREATE UNIQUE INDEX /*i*/change_tag_rc_tag ON /*_*/change_tag (ct_rc_id,ct_tag);
@@ -1315,10 +1320,14 @@
13161321 -- Rollup table to pull a LIST of tags simply without ugly GROUP_CONCAT
13171322 -- that only works on MySQL 4.1+
13181323 CREATE TABLE /*_*/tag_summary (
1319 - ts_rc_id int NULL, -- RCID for the change
1320 - ts_log_id int NULL, -- LOGID for the change
1321 - ts_rev_id int NULL, -- REVID for the change
1322 - ts_tags blob NOT NULL -- Comma-separated list of tags.
 1324+ -- RCID for the change
 1325+ ts_rc_id int NULL,
 1326+ -- LOGID for the change
 1327+ ts_log_id int NULL,
 1328+ -- REVID for the change
 1329+ ts_rev_id int NULL,
 1330+ -- Comma-separated list of tags
 1331+ ts_tags blob NOT NULL
13231332 ) /*$wgDBTableOptions*/;
13241333
13251334 CREATE UNIQUE INDEX /*i*/tag_summary_rc_id ON /*_*/tag_summary (ts_rc_id);

Follow-up revisions

RevisionCommit summaryAuthorDate
r57965Followup to r57964, forgot to revert column changeoverlordq02:50, 21 October 2009
r57966One more to r57964, forgot to apply update to updaters.incoverlordq05:25, 21 October 2009

Status & tagging log