You could create a shared wiki but not give it a domain. Thus creating a shared wiki in database form only
On Thu, Jul 3, 2014 at 4:43 PM, Jason Ji <[email protected]> wrote: > Hello, > > I am attempting to add a column to the *interwiki *table programmatically > in a MediaWiki extension, using a PHP function registered with the > LoadExtensionSchemaUpdates hook. I've been trying to follow the information > from this link > <http://www.mediawiki.org/wiki/Manual:Hooks/LoadExtensionSchemaUpdates>. > However, our setup appears to be causing a complication. I'm sorry if the > following email is long; I just want to make sure I've described our setup > in sufficient detail. > > We run a wiki farm with multiple wikis which share the interwiki table. > However, unlike the process described in this link > <http://www.mediawiki.org/wiki/Manual:Shared_database>, we don't have one > wiki set as the 'main' wiki whose interwiki table is shared with all of the > others; rather, we have created an independent database called > *SHARED_WIKI_TABLES > *which contains at the moment only one table, the interwiki table. Then in > our global LocalSettings.php file, we have the following lines: > > *$wgSharedDB = "SHARED_WIKI_TABLES";* > *$wgSharedPrefix = false;* > *$wgSharedTables = array( 'interwiki' );* > > Consequently, each wiki has its own interwiki table, but there is also a > shared database interwiki table which belongs to no particular wiki. > Whenever we make database reads, it always reads from the shared interwiki > table. In effect, the shared interwiki table overrides the individual > wikis' interwiki tables. So there's never been a problem before. > > Recently I have written an extension which calls the > LoadExtensionSchemaUpdates hook to add some columns to the interwiki table. > However, when I run *php update.php --doshared* on one of our wikis > (--doshared to ensure that shared tables are also updated), what ends up > happening is that the wiki's particular interwiki table is updated, but the > shared wiki table in SHARED_WIKI_TABLES is not updated. Then when we try to > do database reads, they still read from the shared interwiki table, which > was never updated, and we have problems. Furthermore, because > SHARED_WIKI_TABLES is not a database, we can't run update.php on it > directly to update its tables. > > So my question is, will we have to change our set-up to account for this, > where we'll have to pick one of our wikis to be the 'main' wiki whose > interwiki table is shared with all of the others? Or is there a way around > this problem? > > Thanks! > > -- > Jason Ji > [email protected] > _______________________________________________ > MediaWiki-l mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l > _______________________________________________ MediaWiki-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
