Manual:$wgSharedTables/ru

From Linux Web Expert

<translate> Shared DB settings</translate>: $wgSharedTables
List of database tables (without prefixes) to share when $wgSharedDB is enabled.
<translate> Introduced in version:</translate>1.13.0 (r34353)
<translate> Removed in version:</translate><translate> still in use</translate>
<translate> Allowed values:</translate>(array of strings)
<translate> Default value:</translate>see below

This only includes the user table by default for backwards compatibility. However you may remove it so that you can enable extensions using the shared DB without having shared users. Or you can add in another table, such as interwiki to force MediaWiki to use the shared version of the table instead.

Be careful with sharing tables. The images, revisions, pages, and many of the other tables may have bad side effects if you share them.

In 1.16 (r56741), the new table for storing user preferences was added - user_properties .

Default value

<td class="mw-version-versionbox" title="<translate nowrap> The latest stable version is <tvar name=1>1.41</tvar></translate>">
<translate> ≥</translate> 1.39
<translate> MediaWiki version:</translate>
$wgSharedTables = [
	'user',
	'user_properties',
	'user_autocreate_serial',
];
<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.38</tvar> is unsupported version</translate>">
1.27 – 1.38
<translate> MediaWiki versions:</translate>
$wgSharedTables = [
	'user',
	'user_properties',
];
<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.26</tvar> is unsupported version</translate>">
1.13 – 1.26
<translate> MediaWiki versions:</translate>
$wgSharedTables = array( 'user', 'user_properties' );

Upgrading

As of MediaWiki 1.21, $wgSharedTables must be temporarily cleared during upgrade. Otherwise, the shared tables are not touched at all (neither tables with $wgSharedPrefix , nor those with $wgDBprefix ), which may lead to failed upgrade.

Example

If you wanted to share the ipblocks table, you would use:

$wgSharedTables[] = 'ipblocks';

См. также