r108504 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108503‎ | r108504 | r108505 >
Date:15:04, 10 January 2012
Author:reedy
Status:reverted (Comments)
Tags:
Comment:
Cleanup "text" (nee old) table, dropping old indexes and fields

Add oldwatchlist to dropAncientTables
Modified paths:
  • /trunk/phase3/includes/installer/MysqlUpdater.php (modified) (history)
  • /trunk/phase3/maintenance/archives/patch-drop_old_text_fields.sql (added) (history)
  • /trunk/phase3/maintenance/archives/patch-drop_old_text_indexes.sql (added) (history)

Diff [purge]

Index: trunk/phase3/maintenance/archives/patch-drop_old_text_indexes.sql
@@ -0,0 +1,5 @@
 2+DROP INDEX old_namespace ON /*_*/text;
 3+DROP INDEX old_timestamp ON /*_*/text;
 4+DROP INDEX name_title_timestamp ON /*_*/text;
 5+DROP INDEX user_timestamp ON /*_*/text;
 6+DROP INDEX usertext_timestamp ON /*_*/text;
\ No newline at end of file
Property changes on: trunk/phase3/maintenance/archives/patch-drop_old_text_indexes.sql
___________________________________________________________________
Added: svn:eol-style
17 + native
Index: trunk/phase3/maintenance/archives/patch-drop_old_text_fields.sql
@@ -0,0 +1,8 @@
 2+ALTER TABLE /*_*/text DROP COLUMN old_namespace;
 3+ALTER TABLE /*_*/text DROP COLUMN old_title;
 4+ALTER TABLE /*_*/text DROP COLUMN old_comment;
 5+ALTER TABLE /*_*/text DROP COLUMN old_user;
 6+ALTER TABLE /*_*/text DROP COLUMN old_user_text;
 7+ALTER TABLE /*_*/text DROP COLUMN old_timestamp;
 8+ALTER TABLE /*_*/text DROP COLUMN old_minor_edit;
 9+ALTER TABLE /*_*/text DROP COLUMN inverse_timestamp;
\ No newline at end of file
Property changes on: trunk/phase3/maintenance/archives/patch-drop_old_text_fields.sql
___________________________________________________________________
Added: svn:eol-style
110 + native
Index: trunk/phase3/includes/installer/MysqlUpdater.php
@@ -193,6 +193,7 @@
194194 array( 'addField', 'uploadstash', 'us_chunk_inx', 'patch-uploadstash_chunk.sql' ),
195195 array( 'addfield', 'job', 'job_timestamp', 'patch-jobs-add-timestamp.sql' ),
196196 array( 'dropAncientTables' ),
 197+ array( 'cleanupTextTable' ),
197198 );
198199 }
199200
@@ -864,6 +865,7 @@
865866 'links', // 1.4
866867 'linkscc', // 1.4
867868 'old', // 1.4
 869+ 'oldwatchlist', // pre 1.1?
868870 'trackback', // 1.19
869871 'user_rights', // 1.5
870872 'validate', // 1.6
@@ -875,4 +877,30 @@
876878 }
877879 }
878880 }
 881+
 882+ protected function cleanupTextTable() {
 883+ $this->output( "Cleaning up text table\n" );
 884+
 885+ /*$oldIndexes = array(
 886+ 'old_namespace',
 887+ 'old_timestamp',
 888+ 'name_title_timestamp',
 889+ 'user_timestamp',
 890+ 'usertext_timestamp',
 891+ );*/
 892+ $this->dropIndex( 'text', 'old_namespace', 'patch-drop_old_text_indexes.sql' );
 893+
 894+ /*$oldFields = array(
 895+ 'old_namespace',
 896+ 'old_title',
 897+ 'old_comment',
 898+ 'old_user',
 899+ 'old_user_text',
 900+ 'old_timestamp',
 901+ 'old_minor_edit',
 902+ 'inverse_timestamp',
 903+ );*/
 904+ $this->dropField( 'text', 'old_namespace', 'patch-drop_old_text_fields.sql' );
 905+ }
 906+
879907 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r108527Reverted r108502, r108504 per CRaaron18:05, 10 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108502Noticed looking at schema posted by Joerg in bug 33228...reedy14:07, 10 January 2012

Comments

#Comment by Hashar (talk | contribs)   15:19, 10 January 2012

See also bug 33228

Status & tagging log