Kill last vestiges of mediawiki_version. Nobody actually uses it anymore, it just...
authorChad Horohoe <demon@users.mediawiki.org>
Mon, 26 Apr 2010 13:46:04 +0000 (13:46 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Mon, 26 Apr 2010 13:46:04 +0000 (13:46 +0000)
includes/db/DatabaseIbm_db2.php
includes/db/DatabasePostgres.php
maintenance/ibm_db2/tables.sql
maintenance/postgres/archives/patch-mediawiki_version.sql [deleted file]
maintenance/postgres/compare_schemas.pl
maintenance/postgres/mediawiki_mysql2postgres.pl
maintenance/postgres/tables.sql
maintenance/updaters.inc

index 4a73552..c9f4c19 100644 (file)
@@ -747,8 +747,6 @@ EOF;
                        
                        $res = $this->sourceFile( "../maintenance/ibm_db2/tables.sql" );
                        $res = null;
-       
-                       // TODO: update mediawiki_version table
                        
                        // TODO: populate interwiki links
                        
index 381ebd5..0249aad 100644 (file)
@@ -1346,12 +1346,6 @@ SQL;
                $dbn = $this->addQuotes($this->mDBname);
                $ctype = $this->addQuotes( pg_fetch_result($this->doQuery("SHOW lc_ctype"),0,0) );
 
-               $SQL = "UPDATE mediawiki_version SET mw_version=$mwv, pg_version=$pgv, pg_user=$pgu, ".
-                               "mw_schema = $mws, ts2_schema = $tss, pg_port=$pgp, pg_dbname=$dbn, ".
-                               "ctype = $ctype ".
-                               "WHERE type = 'Creation'";
-               $this->query($SQL);
-
                ## Avoid the non-standard "REPLACE INTO" syntax
                $f = fopen( "../maintenance/interwiki.sql", 'r' );
                if ($f == false ) {
index 71c161c..bf5a949 100644 (file)
@@ -721,27 +721,6 @@ CREATE TABLE log_search (
 CREATE UNIQUE INDEX ls_field_val ON log_search (ls_field,ls_value,ls_log_id);
 CREATE INDEX ls_log_id ON log_search (ls_log_id);
 
-CREATE TABLE mediawiki_version (
-  type         VARCHAR(1024)         NOT NULL,
-  mw_version   VARCHAR(1024)         NOT NULL,
-  notes        VARCHAR(1024)         ,
-
-  pg_version   VARCHAR(1024)         ,
-  pg_dbname    VARCHAR(1024)         ,
-  pg_user      VARCHAR(1024)         ,
-  pg_port      VARCHAR(1024)         ,
-  mw_schema    VARCHAR(1024)         ,
-  ts2_schema   VARCHAR(1024)         ,
-  ctype        VARCHAR(1024)         ,
-
-  sql_version  VARCHAR(1024)         ,
-  sql_date     VARCHAR(1024)         ,
-  cdate        TIMESTAMP(3)  NOT NULL DEFAULT CURRENT TIMESTAMP
-);
-
-INSERT INTO mediawiki_version (type,mw_version,sql_version,sql_date)
-  VALUES ('Creation','??','$LastChangedRevision: 34049 $','$LastChangedDate: 2008-04-30 10:20:36 -0400 (Wed, 30 Apr 2008) $');
-
 -- Table for storing localisation data
 CREATE TABLE l10n_cache (
   -- Language code
diff --git a/maintenance/postgres/archives/patch-mediawiki_version.sql b/maintenance/postgres/archives/patch-mediawiki_version.sql
deleted file mode 100644 (file)
index 811b38a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-CREATE TABLE mediawiki_version (
-  type         TEXT         NOT NULL,
-  mw_version   TEXT         NOT NULL,
-  notes        TEXT             NULL,
-
-  pg_version   TEXT             NULL,
-  pg_dbname    TEXT             NULL,
-  pg_user      TEXT             NULL,
-  pg_port      TEXT             NULL,
-  mw_schema    TEXT             NULL,
-  ts2_schema   TEXT             NULL,
-  ctype        TEXT             NULL,
-
-  sql_version  TEXT             NULL,
-  sql_date     TEXT             NULL,
-  cdate        TIMESTAMPTZ  NOT NULL DEFAULT now()
-);
-
index 435a800..c0d22de 100644 (file)
@@ -574,5 +574,4 @@ __DATA__
 OLD: searchindex          ## We use tsearch2 directly on the page table instead
 RENAME: user mwuser       ## Reserved word causing lots of problems
 RENAME: text pagecontent  ## Reserved word
-NEW: mediawiki_version    ## Just us, for now
 XFILE: ../archives/patch-profiling.sql
index 0d1b2ed..416defd 100644 (file)
@@ -421,12 +421,6 @@ SELECT setval('trackbacks_tb_id_seq',  1+coalesce(max(tb_id)  ,0),false) FROM tr
 SELECT setval('user_user_id_seq',      1+coalesce(max(user_id),0),false) FROM mwuser;
 };
 
-## Finally, make a record in the mediawiki_version table about this import
-print qq{
-INSERT INTO mediawiki_version (type,mw_version,notes) VALUES ('MySQL import','??',
-'Imported from file created on $now. Old version: $current_version');
-};
-
 print "COMMIT;\n\\o\n\n-- End of dump\n\n";
 select $oldselect;
 close $mdump or die qq{Could not close "$MYSQLDUMPFILE": $!\n};
@@ -438,7 +432,6 @@ __DATA__
 ## or leave blank if it should be skipped
 pagecontent text
 mwuser user
-mediawiki_version
 archive2
 profiling
 objectcache
index 456a57c..0f8ae56 100644 (file)
@@ -609,27 +609,6 @@ CREATE TABLE user_properties (
 CREATE UNIQUE INDEX user_properties_user_property ON user_properties (up_user,up_property);
 CREATE INDEX user_properties_property ON user_properties (up_property);
 
-CREATE TABLE mediawiki_version (
-  type         TEXT         NOT NULL,
-  mw_version   TEXT         NOT NULL,
-  notes        TEXT             NULL,
-
-  pg_version   TEXT             NULL,
-  pg_dbname    TEXT             NULL,
-  pg_user      TEXT             NULL,
-  pg_port      TEXT             NULL,
-  mw_schema    TEXT             NULL,
-  ts2_schema   TEXT             NULL,
-  ctype        TEXT             NULL,
-
-  sql_version  TEXT             NULL,
-  sql_date     TEXT             NULL,
-  cdate        TIMESTAMPTZ  NOT NULL DEFAULT now()
-);
-
-INSERT INTO mediawiki_version (type,mw_version,sql_version,sql_date)
-  VALUES ('Creation','??','$LastChangedRevision$','$LastChangedDate$');
-
 CREATE TABLE l10n_cache (
   lc_lang     TEXT    NOT NULL,
   lc_key      TEXT    NOT NULL,
index 46110de..fdc510b 100644 (file)
@@ -1580,7 +1580,6 @@ function do_postgres_updates() {
 
        $newtables = array(
                array("category",          "patch-category.sql"),
-               array("mediawiki_version", "patch-mediawiki_version.sql"),
                array("mwuser",            "patch-mwuser.sql"),
                array("pagecontent",       "patch-pagecontent.sql"),
                array("querycachetwo",     "patch-querycachetwo.sql"),
@@ -2032,16 +2031,5 @@ function do_postgres_updates() {
        ## in case they have the old 'default' versions
        if ( $numver >= 8.3 )
                $wgDatabase->sourceFile(archive('patch-tsearch2funcs.sql'));
-
-       ## Put a new row in the mediawiki_version table
-       $wgDatabase->insert( 'mediawiki_version',
-               array(
-                       'type' => 'Update',
-                       'ctype' => 'U',
-                       'mw_version' => $wgVersion,
-                       'pg_version' => $version,
-                       'sql_version' => '$LastChangedRevision$',
-                       'sql_date' => '$LastChangedDate$',
-               ) );
        return;
 }