Hello all,
while trying to update my wiki_family from 1.15.4 to 1.16.0, I see that update.php tries to update my public schema, which contains no wiki.
My PostgreSQL 8.4.5 setup has one schema per wiki, as described here: http://www.mediawiki.org/wiki/Manual:Wiki_family#Ultimate_minimalist_solutio...
My LocalSettings contains: ------- $mysites=array( array('BarbarasWiki','w_barbara','w_barbara'), array('Admin Wiki', 'w_admin', 'w_admin'));
foreach($mysites as $site){
if(strpos($_SERVER['SCRIPT_NAME'],$site[1])!==false){$wgSitename= $site[0];$wgDBmwschema=$site[2];break;}} ##trigger_error("_SERVER['SCRIPT_NAME'] = " . $_SERVER['SCRIPT_NAME'] . ", wgSitename =" . $wgSitename,E_USER_ERROR); if(!$wgSitename && $wgCommandLineMode) { foreach($mysites as $site){
if(strpos($_SERVER['PWD'],$site[1])!==false){$wgSitename=$site[0]; $wgDBmwschema=$site[2];break;}}}
if(!$wgSitename){trigger_error('Internal Error - Please mail webmaster',E_USER_ERROR);} -------
What shall I do to update my schemas?
Thanks, Axel --- axel.rau@chaos1.de PGP-Key:29E99DD6 +49 151 2300 9283 computing @ chaos claudius
I had to do this for our family of multilanguage wikis. My solution was to write a Linux shell script that accepts one parameter, the name of the site (e.g., BarbarasWiki), and:
1. Copies LocalSettings.php to a temp file (say, my-temp-file.php) 2. Appends site-specific settings (for BarbarasWiki or whatever) to my-temp-file.php 3. Invokes "cd /mywiki/maintenance && php update.php --aconf my-temp-file.php $@"
Then I ran this for each site.
Maybe someday, MediaWiki will have built-in support of this kind for wiki families. Right now you have to roll your own.
DanB
-----Original Message----- while trying to update my wiki_family from 1.15.4 to 1.16.0, I see that update.php tries to update my public schema, which contains no wiki.
Am 26.10.2010 um 17:01 schrieb Daniel Barrett:
I had to do this for our family of multilanguage wikis. My solution was to write a Linux shell script that accepts one parameter, the name of the site (e.g., BarbarasWiki), and:
- Copies LocalSettings.php to a temp file (say, my-temp-file.php)
- Appends site-specific settings (for BarbarasWiki or whatever) to
my-temp-file.php 3. Invokes "cd /mywiki/maintenance && php update.php --aconf my-temp- file.php $@"
Thanks for responding.
I ended up renaming my schema to "mediawiki", running the update script and renaming it back. I did this for each schema/wiki.
Unfortunately update.php does not use one big transaction for the hole stuff (that's why we use a RDBMs, right?), so I needed one db-restore for each trial (-;
Axel --- axel.rau@chaos1.de PGP-Key:29E99DD6 +49 151 2300 9283 computing @ chaos claudius
mediawiki-l@lists.wikimedia.org