$res = $this->sourceFile( "../maintenance/ibm_db2/tables.sql" );
$res = null;
-
- // TODO: update mediawiki_version table
// TODO: populate interwiki links
$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 ) {
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
+++ /dev/null
-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()
-);
-
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
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};
## or leave blank if it should be skipped
pagecontent text
mwuser user
-mediawiki_version
archive2
profiling
objectcache
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,
$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"),
## 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;
}