r22597 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22596‎ | r22597 | r22598 >
Date:15:26, 31 May 2007
Author:aaron
Status:old
Tags:
Comment:
*Restore oldimage schema changes removed temporarily in r21957 (with some index modifications)
Modified paths:
  • /trunk/phase3/maintenance/archives/patch-oi_metadata.sql (added) (history)
  • /trunk/phase3/maintenance/ora/tables.sql (modified) (history)
  • /trunk/phase3/maintenance/postgres/tables.sql (modified) (history)
  • /trunk/phase3/maintenance/tables.sql (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/archives/patch-oi_metadata.sql
@@ -0,0 +1,16 @@
 2+--
 3+-- patch-indexes.sql
 4+--
 5+-- Add data to allow for direct reference to old images
 6+-- They can be included into pages
 7+--
 8+
 9+ALTER TABLE /*$wgDBprefix*/oldimage
 10+ DROP INDEX oi_name,
 11+ ADD INDEX oi_name_timestamp (oi_name,oi_timestamp),
 12+ ADD INDEX oi_name_archive_name (oi_name,oi_archive_name),
 13+ ADD oi_metadata mediumblob NOT NULL,
 14+ ADD oi_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
 15+ ADD oi_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") NOT NULL default "unknown",
 16+ ADD oi_minor_mime varchar(32) NOT NULL default "unknown",
 17+ ADD oi_deleted tinyint(1) unsigned NOT NULL default '0',
\ No newline at end of file
Index: trunk/phase3/maintenance/ora/tables.sql
@@ -244,9 +244,15 @@
245245 oi_description CLOB,
246246 oi_user INTEGER NULL REFERENCES mwuser(user_id) ON DELETE SET NULL,
247247 oi_user_text CLOB NOT NULL,
248 - oi_timestamp TIMESTAMP WITH TIME ZONE NOT NULL
 248+ oi_timestamp TIMESTAMP WITH TIME ZONE NOT NULL,
 249+ oi_metadata CLOB,
 250+ oi_media_type VARCHAR(10) DEFAULT NULL,
 251+ oi_major_mime VARCHAR(11) DEFAULT 'unknown',
 252+ oi_minor_mime VARCHAR(32) DEFAULT 'unknown',
 253+ oi_deleted INTEGER DEFAULT 0 NOT NULL
249254 );
250 -CREATE INDEX oi_name ON oldimage (oi_name);
 255+CREATE INDEX oi_name_timestamp ON oldimage (oi_name,oi_timestamp);
 256+CREATE INDEX oi_name_archive_name ON oldimage (oi_name,oi_archive_name);
251257
252258 CREATE SEQUENCE filearchive_fa_id_seq;
253259 CREATE TABLE filearchive (
Index: trunk/phase3/maintenance/postgres/tables.sql
@@ -262,9 +262,15 @@
263263 oi_description TEXT,
264264 oi_user INTEGER NULL REFERENCES mwuser(user_id) ON DELETE SET NULL,
265265 oi_user_text TEXT NOT NULL,
266 - oi_timestamp TIMESTAMPTZ NOT NULL
 266+ oi_timestamp TIMESTAMPTZ NOT NULL,
 267+ oi_metadata BYTEA NOT NULL,
 268+ oi_media_type TEXT NULL,
 269+ oi_major_mime TEXT NOT NULL DEFAULT 'unknown',
 270+ oi_minor_mime TEXT NOT NULL DEFAULT 'unknown',
 271+ oi_deleted CHAR NOT NULL DEFAULT '0'
267272 );
268 -CREATE INDEX oi_name ON oldimage (oi_name);
 273+CREATE INDEX oi_name_timestamp ON oldimage (oi_name,oi_timestamp);
 274+CREATE INDEX oi_name_archive_name ON oldimage (oi_name,oi_archive_name);
269275
270276
271277 CREATE TABLE filearchive (
Index: trunk/phase3/maintenance/tables.sql
@@ -716,7 +716,14 @@
717717 oi_user_text varchar(255) binary NOT NULL,
718718 oi_timestamp char(14) binary NOT NULL default '',
719719
720 - INDEX oi_name (oi_name(10))
 720+ oi_metadata mediumblob NOT NULL,
 721+ oi_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
 722+ oi_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") NOT NULL default "unknown",
 723+ oi_minor_mime varchar(32) NOT NULL default "unknown",
 724+ oi_deleted tinyint(1) unsigned NOT NULL default '0',
 725+
 726+ INDEX oi_name_timestamp (oi_name,oi_timestamp),
 727+ INDEX oi_name_archive_name (oi_name,oi_archive_name)
721728
722729 ) /*$wgDBTableOptions*/;
723730

Follow-up revisions

RevisionCommit summaryAuthorDate
r22619Merged revisions 22587-22618 via svnmerge from...david04:13, 1 June 2007

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r21957Revert schema changes in r21954, 21955, 21956 for the momentbrion16:24, 7 May 2007