Please don't commit schema changes to trunk until you've cleared them with me and Tim -- remember trunk is meant to be ready-to-run live at all times.
They force operational work before we can update the software again, and it's a big pain in the ass to deal with them unexpectedly.
*
* @param Revision $rev
*
- * @todo This is a lousy interface function. Kill it and replace the
- * other cruddy functions like editUpdates and such so it's not needed
+ * @todo This is a shitty interface function. Kill it and replace the
+ * other shitty functions like editUpdates and such so it's not needed
* anymore.
*/
function createUpdates( $rev ) {
+++ /dev/null
--- Add rev_bot column. We don't need an index if all we want to be able to do
--- is, e.g., hide bot edits: most edits are non-bot, so for normal use it's
--- better to just look at 20% more rows or whatever than to add a new index.
-ALTER TABLE /*$wgDBprefix*/revision
- ADD COLUMN rev_bot tinyint unsigned NOT NULL default 0 AFTER rev_deleted;
+++ /dev/null
--- New index on revision table to allow searches for all edits by a given user
--- to a given page. Added 2007-08-28
-
-ALTER TABLE /*$wgDBprefix*/revision
- ADD INDEX page_user_timestamp (rev_page,rev_user,rev_timestamp);
-- Not yet used; reserved for future changes to the deletion system.
rev_deleted tinyint unsigned NOT NULL default '0',
- -- Was this edit made by a bot (and marked as such)?
- rev_bot tinyint unsigned NOT NULL default '0',
-
-- Length of this revision in bytes
rev_len int unsigned,
INDEX rev_timestamp (rev_timestamp),
INDEX page_timestamp (rev_page,rev_timestamp),
INDEX user_timestamp (rev_user,rev_timestamp),
- INDEX usertext_timestamp (rev_user_text,rev_timestamp),
- INDEX page_user_timestamp (rev_page,rev_user,rev_timestamp)
+ INDEX usertext_timestamp (rev_user_text,rev_timestamp)
) /*$wgDBTableOptions*/ MAX_ROWS=10000000 AVG_ROW_LENGTH=1024;
-- In case tables are created as MyISAM, use row hints for MySQL <5.0 to avoid 4GB limit
array( 'oldimage', 'oi_metadata', 'patch-oi_metadata.sql'),
array( 'archive', 'ar_page_id', 'patch-archive-page_id.sql'),
array( 'image', 'img_sha1', 'patch-img_sha1.sql' ),
- array( 'revision', 'rev_bot', 'patch-rev_bot.sql' ),
);
# For extensions only, should be populated via hooks
do_oldimage_user_index(); flush ();
- do_revision_page_user_index(); flush ();
-
echo "Deleting old default messages (this may take a long time!)..."; flush();
deleteDefaultMessages();
echo "Done\n"; flush();
}
-function do_revision_page_user_index() {
- global $wgDatabase;
- if( $wgDatabase->indexExists( 'revision', 'page_user_timestamp' ) ) {
- echo "...page,user,timestamp key on revision already exists.\n";
- } else {
- echo "Adding page,user,timestamp key on revision table... ";
- dbsource( archive("patch-revision-user-page-index.sql"), $wgDatabase );
- echo "ok\n";
- }
-}
-
function
pg_describe_table($table)
{