Index: trunk/phase3/maintenance/archives/patch-oi_metadata.sql |
— | — | @@ -1,15 +0,0 @@ |
2 | | -
|
3 | | -ALTER TABLE /*$wgDBprefix*/oldimage
|
4 | | - DROP INDEX oi_name,
|
5 | | - ADD INDEX oi_name_timestamp (oi_name,oi_timestamp),
|
6 | | - ADD oi_metadata mediumblob NOT NULL,
|
7 | | - ADD oi_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
|
8 | | - ADD oi_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") NOT NULL default "unknown",
|
9 | | - ADD oi_minor_mime varchar(32) NOT NULL default "unknown",
|
10 | | - ADD oi_deleted tinyint(1) unsigned NOT NULL default '0', |
\ No newline at end of file |
Index: trunk/phase3/maintenance/ora/tables.sql |
— | — | @@ -244,12 +244,7 @@ |
245 | 245 | oi_description CLOB, |
246 | 246 | oi_user INTEGER NULL REFERENCES mwuser(user_id) ON DELETE SET NULL, |
247 | 247 | oi_user_text CLOB 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 |
| 248 | + oi_timestamp TIMESTAMP WITH TIME ZONE NOT NULL |
254 | 249 | ); |
255 | 250 | CREATE INDEX oi_name ON oldimage (oi_name); |
256 | 251 | |
Index: trunk/phase3/maintenance/postgres/tables.sql |
— | — | @@ -262,12 +262,7 @@ |
263 | 263 | oi_description TEXT, |
264 | 264 | oi_user INTEGER NULL REFERENCES mwuser(user_id) ON DELETE SET NULL, |
265 | 265 | oi_user_text TEXT 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' |
| 266 | + oi_timestamp TIMESTAMPTZ NOT NULL |
272 | 267 | ); |
273 | 268 | CREATE INDEX oi_name ON oldimage (oi_name); |
274 | 269 | |
Index: trunk/phase3/maintenance/updaters.inc |
— | — | @@ -76,7 +76,6 @@ |
77 | 77 | array( 'archive', 'ar_len', 'patch-ar_len.sql' ), |
78 | 78 | array( 'revision', 'rev_parent_id', 'patch-rev_parent_id.sql' ), |
79 | 79 | array( 'page_restrictions', 'pr_id', 'patch-page_restrictions_sortkey.sql' ), |
80 | | - array( 'oldimage', 'oi_metadata', 'patch-oi_metadata.sql' ), |
81 | 80 | ); |
82 | 81 | |
83 | 82 | function rename_table( $from, $to, $patch ) { |
— | — | @@ -1196,11 +1195,6 @@ |
1197 | 1196 | array("logging", "log_params", "TEXT"), |
1198 | 1197 | array("mwuser", "user_editcount", "INTEGER"), |
1199 | 1198 | array("mwuser", "user_newpass_time", "TIMESTAMPTZ"), |
1200 | | - array("oldimage", "oi_metadata", "BYTEA NOT NULL"), |
1201 | | - array("oldimage", "oi_media_type", "TEXT NOT NULL"), |
1202 | | - array("oldimage", "oi_major_mime", "TEXT NOT NULL DEFAULT 'unknown'"), |
1203 | | - array("oldimage", "oi_minor_mime", "TEXT NOT NULL DEFAULT 'unknown'"), |
1204 | | - array("oldimage", "oi_deleted", "CHAR NOT NULL DEFAULT '0'"), |
1205 | 1199 | array("page_restrictions", "pr_id", "INTEGER NOT NULL UNIQUE DEFAULT nextval('pr_id_val')"), |
1206 | 1200 | array("recentchanges", "rc_deleted", "INTEGER NOT NULL DEFAULT 0"), |
1207 | 1201 | array("recentchanges", "rc_log_action", "TEXT"), |
Index: trunk/phase3/maintenance/rebuildImages.php |
— | — | @@ -144,7 +144,7 @@ |
145 | 145 | } |
146 | 146 | |
147 | 147 | function oldimageCallback( $row ) { |
148 | | - if( $row->oi_width && $row->oi_media_type ) { |
| 148 | + if( $row->oi_width ) { |
149 | 149 | return null; |
150 | 150 | } |
151 | 151 | |
— | — | @@ -153,11 +153,7 @@ |
154 | 154 | return array( |
155 | 155 | 'oi_width' => $info['width' ], |
156 | 156 | 'oi_height' => $info['height'], |
157 | | - 'oi_bits' => $info['bits' ], |
158 | | - 'oi_metadata' => '', // filled in on-demand |
159 | | - 'oi_media_type' => $info['media'], |
160 | | - 'oi_major_mime' => $info['major'], |
161 | | - 'oi_minor_mime' => $info['minor'] ); |
| 157 | + 'oi_bits' => $info['bits' ] ); |
162 | 158 | } |
163 | 159 | |
164 | 160 | function crawlMissing() { |
Index: trunk/phase3/maintenance/tables.sql |
— | — | @@ -715,21 +715,6 @@ |
716 | 716 | oi_user int(5) unsigned NOT NULL default '0', |
717 | 717 | oi_user_text varchar(255) binary NOT NULL, |
718 | 718 | oi_timestamp char(14) binary NOT NULL default '', |
719 | | - |
720 | | - -- Extracted EXIF metadata stored as a serialized PHP array. |
721 | | - oi_metadata mediumblob NOT NULL, |
722 | | - -- Media type as defined by the MEDIATYPE_xxx constants |
723 | | - oi_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL, |
724 | | - -- major part of a MIME media type as defined by IANA |
725 | | - -- see http://www.iana.org/assignments/media-types/ |
726 | | - oi_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") NOT NULL default "unknown", |
727 | | - -- minor part of a MIME media type as defined by IANA |
728 | | - -- the minor parts are not required to adher to any standard |
729 | | - -- but should be consistent throughout the database |
730 | | - -- see http://www.iana.org/assignments/media-types/ |
731 | | - oi_minor_mime varchar(32) NOT NULL default "unknown", |
732 | | - |
733 | | - oi_deleted tinyint(1) unsigned NOT NULL default '0', |
734 | 719 | |
735 | 720 | INDEX oi_name (oi_name(10)) |
736 | 721 | |